.excel-upload-form {
  margin: 20px 0;
  padding: 20px;
  background: #fff;
  border: 1px solid #ccd0d4;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.excel-upload-form input[type="text"] {
  width: 300px;
  margin: 0 10px;
}

.excel-tables-list {
  margin-top: 30px;
}

.delete-table {
  color: #dc3232;
}

.delete-table:hover {
  color: #a00;
}

/* Table Container */
body .excel-table-container {
    margin: 40px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(30, 30, 30, 0.6) !important;
    border-radius: 8px !important;
    padding: 20px !important;
}

.excel-table {
    width: 100% !important;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto;
    color: #ffffff;
}

/* Table Header */
body .excel-table thead th {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Table Body */
body .excel-table tbody td {
    padding: 12px 15px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    background: transparent !important;
}

.excel-table tbody tr {
    transition: background-color 0.2s ease;
}

/* Hover Effects */
body .excel-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* DataTables Controls */
body .dataTables_wrapper .dataTables_length,
body .dataTables_wrapper .dataTables_filter {
    color: #ffffff !important;
    margin-bottom: 20px !important;
}

body .dataTables_wrapper .dataTables_length select,
body .dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
}

body .dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Pagination */
body .dataTables_wrapper .dataTables_paginate {
    margin-top: 20px !important;
    color: #ffffff !important;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 10px !important;
    margin: 0 4px !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Info Text */
body .dataTables_wrapper .dataTables_info {
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 20px !important;
}

/* Sorting Icons */
body .excel-table thead th.sorting:after,
body .excel-table thead th.sorting_asc:after,
body .excel-table thead th.sorting_desc:after {
    /* position: absolute !important;
    right: 8px !important;
    top: 50% !important; */
    margin-top: 4px !important;
    transform: translateY(-50%) !important;
    opacity: 0.5 !important;
    color: #ffffff !important;
}

body .excel-table thead th.sorting:after {
    content: "↕" !important;
}

body .excel-table thead th.sorting_asc:after {
    content: "↑" !important;
    opacity: 1 !important;
}

body .excel-table thead th.sorting_desc:after {
    content: "↓" !important;
    opacity: 1 !important;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .excel-table-container {
        margin: 20px -20px;
        border-radius: 0;
        padding: 10px;
    }

    .dataTables_wrapper {
        padding: 0 10px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        float: none;
        text-align: left;
        margin-bottom: 15px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
    }
}

/* Ensure all cells can wrap content */
.excel-table td,
.excel-table th {
    white-space: normal;
    word-wrap: break-word;
    min-width: 100px;
}

/* Remove any unwanted borders or backgrounds */
body .excel-table,
body .excel-table th,
body .excel-table td {
    border: none !important;
    background: transparent !important;
}

/* Use very specific selectors that won't get purged */
.etv-wrapper {
    @apply w-full my-10;
    background: rgba(30, 30, 30, 0.6) !important;
    border-radius: 8px !important;
    padding: 20px !important;
}

.etv-wrapper .etv-table {
    @apply w-full;
}

.etv-wrapper .etv-table thead th {
    @apply bg-opacity-10 bg-white text-white font-medium uppercase tracking-wider p-4 relative cursor-pointer;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.etv-wrapper .etv-table tbody td {
    @apply p-4 text-white border-b border-white border-opacity-10;
}

/* DataTables specific styles */
.etv-wrapper .dataTables_wrapper {
    @apply text-white;
}

.etv-wrapper .dataTables_length,
.etv-wrapper .dataTables_filter {
    @apply mb-5;
}

.etv-wrapper .dataTables_length select,
.etv-wrapper .dataTables_filter input {
    @apply bg-white bg-opacity-10 border border-white border-opacity-20 text-white p-2 rounded;
}

.etv-wrapper .dataTables_paginate {
    @apply mt-5 text-white;
}

.etv-wrapper .dataTables_paginate .paginate_button {
    @apply px-3 py-2 mx-1 rounded bg-white bg-opacity-10 border border-white border-opacity-20 text-white;
}

.etv-wrapper .dataTables_paginate .paginate_button:hover {
    @apply bg-white bg-opacity-20 border-opacity-30;
}

.etv-wrapper .dataTables_paginate .paginate_button.current {
    @apply bg-white bg-opacity-20 border-opacity-30;
}

/* Sorting indicators */
.etv-wrapper .etv-table thead th.sorting:after {
    content: "↕";
    @apply absolute right-2 top-1/2 transform -translate-y-1/2 opacity-50 text-white;
}

.etv-wrapper .etv-table thead th.sorting_asc:after {
    content: "↑";
    @apply absolute right-2 top-1/2 transform -translate-y-1/2 text-white;
}

.etv-wrapper .etv-table thead th.sorting_desc:after {
    content: "↓";
    @apply absolute right-2 top-1/2 transform -translate-y-1/2 text-white;
}

/* Reset and base styles */
.excel-table-container {
    background: rgba(30, 30, 30, 0.6);
    border-radius: 8px;
    padding: 20px;
    margin: 40px 0;
}

/* DataTables specific overrides */
.dataTables_wrapper {
    color: #fff;
    font-family: inherit;
}

/* Controls styling */
.dataTables_length,
.dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_length select,
.dataTables_filter input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 4px;
}

/* Table styling */
table.excel-table {
    width: 100% !important;
    margin: 1rem 0;
    border-collapse: collapse;
}

table.excel-table thead th {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

table.excel-table tbody td {
    padding: 12px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sorting icons */
table.excel-table thead th.sorting,
table.excel-table thead th.sorting_asc,
table.excel-table thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 24px;
}

table.excel-table thead th.sorting:after,
table.excel-table thead th.sorting_asc:after,
table.excel-table thead th.sorting_desc:after {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

table.excel-table thead th.sorting:after {
    content: "↕";
}

table.excel-table thead th.sorting_asc:after {
    content: "↑";
    opacity: 1;
}

table.excel-table thead th.sorting_desc:after {
    content: "↓";
    opacity: 1;
}

/* Pagination */
.dataTables_paginate {
    margin-top: 1rem;
    text-align: right;
}

.dataTables_paginate .paginate_button {
    padding: 4px 10px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    text-decoration: none;
}

.dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.dataTables_paginate .paginate_button.current {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Info text */
.dataTables_info {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

/* Hover effect */
table.excel-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Base container */
.excel-container {
    @apply w-full my-10 bg-black/60;
}

/* Table controls */
.excel-wrapper .top {
    @apply flex flex-wrap gap-4 mb-4 text-white;
}

.dataTables_length select,
.dataTables_filter input {
    @apply bg-white/10 border border-white/20 rounded px-3 py-1 text-white;
}

/* Table header */
.excel-table thead th {
    @apply bg-white/10 text-white font-medium uppercase tracking-wider p-4 border-b border-white/20 text-left;
}

/* Table body */
.excel-table tbody td {
    @apply p-4 text-white border-b border-white/10;
}

.excel-table tbody tr:hover {
    @apply bg-white/5;
}

/* Pagination */
.excel-wrapper .bottom {
    @apply flex flex-wrap gap-4 mt-4 text-white;
}

.dataTables_paginate .paginate_button {
    @apply px-3 py-1 mx-1 rounded bg-white/10 border border-white/20 text-white cursor-pointer;
}

.dataTables_paginate .paginate_button:hover,
.dataTables_paginate .paginate_button.current {
    @apply bg-white/20 border-white/30;
}

/* Info text */
.dataTables_info {
    @apply text-white/70;
}

/* Sorting indicators - position right after text */
.excel-table thead th.sorting:after,
.excel-table thead th.sorting_asc:after,
.excel-table thead th.sorting_desc:after {
    display: inline-block;
    margin-left: 8px;
    position: static !important;
    transform: none !important;
    vertical-align: middle;
    opacity: 0.5;
}

.excel-table thead th.sorting:after {
    content: "↕";
}

.excel-table thead th.sorting_asc:after {
    content: "↑";
    opacity: 1;
}

.excel-table thead th.sorting_desc:after {
    content: "↓";
    opacity: 1;
}

/* Make the table columns distribute space evenly */
.excel-table {
    width: 100%;
    table-layout: fixed;
}

.excel-table th,
.excel-table td {
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* First column (KEYWORD) can be wider */
.excel-table th:first-child,
.excel-table td:first-child {
    width: 70%;
}

/* Second column (VOLUME) takes remaining space */
.excel-table th:last-child,
.excel-table td:last-child {
    width: 30%;
    text-align: right;
}

/* Search box styling */
.dataTables_filter {
    @apply mb-2;
}

.dataTables_filter input {
    @apply bg-white/10 border border-white/20 text-white p-2 rounded ml-2;
}
