/**
 * Transfer Monster Dashboard CSS
 * Styling for the transfer dashboard - Dark Theme
 */

/* Main dashboard container */
.tmd-container {
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
   max-width: 100%;
   margin: 0 auto;
   padding: 0;
   background-color: #161616;
   color: #e4e7eb;
   border-radius: 5px;
   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
   overflow-x: auto;
}

/* Dashboard header with title and filters */
.tmd-header {
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
   align-items: center;
   padding: 15px 20px;
   background-color: #1e1e2d;
   border-bottom: 2px solid #222222;
}

.tmd-title {
   font-size: 24px;
   font-weight: 600;
   color: #f7fafc;
   margin: 0;
   padding: 0;
   text-transform: uppercase;
}

/* Filter container */
.tmd-filters {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 15px;
}

/* Styling for filter dropdowns */
.tmd-filter-group {
   position: relative;
}

.tmd-filter-group select {
   appearance: none;
   -webkit-appearance: none;
   -moz-appearance: none;
   background-color: #222222;
   color: #1747d3;
   border: 1px solid #333333;
   border-radius: 4px;
   padding: 8px 32px 8px 12px;
   min-width: 120px;
   cursor: pointer;
   font-size: 14px;
}

.tmd-filter-group select:focus {
   outline: none;
   border-color: #00ff84;
   box-shadow: 0 0 0 2px rgba(0, 255, 132, 0.2);
}

.tmd-filter-group::after {
   content: '';
   position: absolute;
   top: 50%;
   right: 12px;
   transform: translateY(-50%);
   width: 0;
   height: 0;
   border-left: 5px solid transparent;
   border-right: 5px solid transparent;
   border-top: 5px solid #e4e7eb;
   pointer-events: none;
}

/* Export button - admin only */
.tmd-export-btn {
   background-color: #00ff84;
   color: #000;
   border: none;
   border-radius: 4px;
   padding: 8px 16px;
   font-size: 14px;
   font-weight: 600;
   cursor: pointer;
   transition: background-color 0.2s ease;
}

.tmd-export-btn:hover {
   background-color: #00cc6b;
}

/* Transfer table styling */
.tmd-table {
   width: 100%;
   border-collapse: separate;
   border-spacing: 0;
   font-size: 14px;
}

.tmd-table th {
   background-color: #222222;
   color: #f7fafc;
   text-align: left;
   padding: 12px 16px;
   font-weight: 600;
   border-bottom: 2px solid #333333;
   text-transform: uppercase;
   position: relative;
   cursor: pointer;
}

.tmd-table th:hover {
   background-color: #2a2a3a;
}

/* Sort indicators for table headers */
.tmd-sort-indicator {
   margin-left: 5px;
   display: inline-block;
   opacity: 0.5;
}

.tmd-sort-asc .tmd-sort-indicator::after {
   content: '↑';
}

.tmd-sort-desc .tmd-sort-indicator::after {
   content: '↓';
}

.tmd-sort-active {
   opacity: 1;
}

/* Table rows styling */
.tmd-table tr {
   background-color: #161616;
   transition: background-color 0.2s ease;
}

.tmd-table tr:hover {
   background-color: #1e1e2d;
}

.tmd-table td {
   padding: 12px 16px;
   border-bottom: 1px solid #222222;
   vertical-align: middle;
}

.tmd-table tr:last-child td {
   border-bottom: none;
}

/* Player column styling */
.tmd-player-cell {
   display: flex;
   align-items: center;
   gap: 12px;
}

.tmd-player-img {
   width: 36px;
   height: 36px;
   border-radius: 50%;
   object-fit: cover;
}

.tmd-player-name {
   font-weight: 500;
   color: #e4e7eb;
}

.tmd-player-info {
   font-size: 12px;
   color: #a0aec0;
}

/* Team columns styling */
.tmd-team-cell {
   display: flex;
   align-items: center;
   gap: 8px;
}

.tmd-team-logo {
   width: 24px;
   height: 24px;
   object-fit: contain;
}

.tmd-team-name {
   color: #e4e7eb;
   font-weight: 500;
}

.tmd-free-agent {
   font-style: italic;
   color: #a0aec0;
}

/* Status indicators - Font Awesome styling */
.tmd-status-cell {
   text-align: center;
}

.tmd-status-cell .fa {
   margin: 0 2px;
}

.text-success {
   color: #00ff84;
}

.text-danger {
   color: #ff3b5c;
}

.text-warning {
   color: #ed8936;
}

/* Date column styling */
.tmd-date-cell {
   width: 100px;
   text-align: center;
   color: #a0aec0;
}

/* Contract status styling */
.tmd-contract-cell {
   width: 100px;
   text-align: center;
}

.tmd-contract-status {
   display: inline-block;
   padding: 4px 8px;
   border-radius: 4px;
   font-size: 12px;
   font-weight: 600;
   text-transform: uppercase;
}

.tmd-status-active {
   background-color: rgba(0, 255, 132, 0.2);
   color: #00ff84;
}

.tmd-status-terminated {
   background-color: rgba(255, 59, 92, 0.2);
   color: #ff3b5c;
}

.tmd-status-pending {
   background-color: rgba(237, 137, 54, 0.2);
   color: #ed8936;
}

/* Loading overlay */
.tmd-loading {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(22, 22, 22, 0.8);
   display: flex;
   justify-content: center;
   align-items: center;
   z-index: 100;
   font-size: 16px;
   color: #e4e7eb;
}

.tmd-loading::after {
   content: '';
   width: 24px;
   height: 24px;
   border: 3px solid #333333;
   border-top: 3px solid #00ff84;
   border-radius: 50%;
   margin-left: 10px;
   animation: tmd-spin 1s linear infinite;
}

@keyframes tmd-spin {
   0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}

/* No results message */
.tmd-no-results {
   text-align: center;
   padding: 30px;
   color: #a0aec0;
   font-style: italic;
}

/* Pagination */
.tmd-pagination {
   display: flex;
   justify-content: center;
   padding: 15px;
   gap: 5px;
}

.tmd-page-button {
   background-color: #222222;
   color: #e4e7eb;
   border: none;
   border-radius: 4px;
   padding: 5px 10px;
   cursor: pointer;
   transition: background-color 0.2s ease;
}

.tmd-page-button:hover {
   background-color: #333333;
}

.tmd-page-button.tmd-active {
   background-color: #00ff84;
   color: #000;
}

.tmd-page-button.tmd-disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

/* Load more button */
.tmd-load-more {
   display: flex;
   justify-content: center;
   margin-top: 20px;
   padding-bottom: 20px;
}

.tmd-load-more-btn {
   background-color: #222222;
   color: #e4e7eb;
   border: none;
   border-radius: 4px;
   padding: 8px 16px;
   cursor: pointer;
   font-size: 14px;
   transition: background-color 0.2s ease;
}

.tmd-load-more-btn:hover {
   background-color: #333333;
}

/* Export dropdown styling */
.tmd-export-dropdown {
   position: relative;
   display: inline-block;
}

.tmd-export-options {
   display: none;
   position: absolute;
   right: 0;
   top: 40px;
   background-color: #222222;
   min-width: 120px;
   box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
   z-index: 10;
   border-radius: 4px;
   overflow: hidden;
}

.tmd-export-options a {
   color: #e4e7eb;
   padding: 10px 15px;
   text-decoration: none;
   display: block;
   text-align: left;
   transition: background-color 0.2s ease;
}

.tmd-export-options a:hover {
   background-color: #333333;
}

.tmd-export-dropdown:hover .tmd-export-options {
   display: block;
}

/* Responsive styling */
@media screen and (max-width: 768px) {
   .tmd-header {
       flex-direction: column;
       align-items: flex-start;
       gap: 15px;
   }
   
   .tmd-filters {
       flex-direction: column;
       align-items: flex-start;
       width: 100%;
   }
   
   .tmd-filter-group {
       width: 100%;
   }
   
   .tmd-filter-group select {
       width: 100%;
   }
   
   .tmd-table {
       font-size: 12px;
   }
   
   .tmd-table th,
   .tmd-table td {
       padding: 8px 6px;
   }
   
   .tmd-player-img {
       width: 28px;
       height: 28px;
   }
   
   .tmd-team-logo {
       width: 20px;
       height: 20px;
   }
   
   .tmd-export-btn {
       width: 100%;
       margin-top: 15px;
   }
}

/* Mobile layout - Compact table instead of cards */
@media screen and (max-width: 480px) {
   .tmd-table {
       font-size: 11px;
       overflow-x: auto;
       display: block;
       white-space: nowrap;
   }
   
   .tmd-table thead,
   .tmd-table tbody,
   .tmd-table tr {
       display: block;
   }
   
   .tmd-table thead tr {
       position: absolute;
       top: -9999px;
       left: -9999px;
   }
   
   .tmd-table tbody tr {
       border: 1px solid #333333;
       border-radius: 4px;
       margin-bottom: 10px;
       padding: 8px;
       display: block;
       background-color: #1e1e2d;
   }
   
   .tmd-table td {
       border: none;
       display: block;
       padding: 3px 0;
       text-align: left;
   }
   
   .tmd-table td::before {
       content: attr(data-label) ": ";
       font-weight: bold;
       color: #a0aec0;
       display: inline-block;
       width: 80px;
       font-size: 10px;
   }
   
   .tmd-player-cell,
   .tmd-team-cell {
       display: inline-flex;
       align-items: center;
       gap: 6px;
   }
   
   .tmd-player-img {
       width: 24px;
       height: 24px;
   }
   
   .tmd-team-logo {
       width: 16px;
       height: 16px;
   }
   
   .tmd-status-cell .fa {
       font-size: 14px;
   }
}

/* Additional color scheme adjustments */
.tmd-color-scheme-blue .text-success {
   color: #3182ce; /* Blue */
}

.tmd-color-scheme-blue .tmd-status-active {
   background-color: rgba(49, 130, 206, 0.2);
   color: #3182ce;
}

.tmd-color-scheme-purple .text-success {
   color: #805ad5; /* Purple */
}

.tmd-color-scheme-purple .tmd-status-active {
   background-color: rgba(128, 90, 213, 0.2);
   color: #805ad5;
}