/* TheDigiFuture Payout System - Frontend CSS */

/* ============================================================================
   MAIN STYLES
   ============================================================================ */

.tdfs-wallet-section,
.tdfs-paid-section,
.tdfs-total-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.tdfs-paid-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

.tdfs-total-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.tdfs-section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tdfs-amount-display {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tdfs-total {
    font-size: 56px;
}

.tdfs-wallet-info,
.tdfs-earnings-breakdown {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.tdfs-wallet-info p,
.tdfs-earnings-breakdown p {
    margin: 5px 0;
    font-size: 14px;
}

/* ============================================================================
   PROGRESS BAR
   ============================================================================ */

.tdfs-progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.tdfs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ffcc);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.tdfs-progress-text {
    text-align: center;
    font-size: 12px;
    opacity: 0.8;
}

/* ============================================================================
   LOGIN REQUIRED
   ============================================================================ */

.tdfs-login-required {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    color: #856404;
}

/* ============================================================================
   MINIMUM NOTICE
   ============================================================================ */

.tdfs-minimum-notice {
    background: white;
    border: 2px dashed #ffc107;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    text-align: center;
}

.tdfs-minimum-notice h4 {
    color: #ffc107;
    margin: 0 0 20px 0;
    font-size: 20px;
}

.tdfs-current-status {
    max-width: 400px;
    margin: 0 auto;
}

.tdfs-current-status p {
    margin: 10px 0;
    font-size: 16px;
}

.tdfs-current-status strong {
    color: #333;
    font-size: 18px;
}

/* ============================================================================
   PENDING NOTICE
   ============================================================================ */

.tdfs-pending-notice {
    background: #e7f3ff;
    border: 2px solid #b8daff;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    text-align: center;
}

.tdfs-pending-notice h4 {
    color: #004085;
    margin: 0 0 15px 0;
}

.tdfs-pending-notice p {
    color: #004085;
    margin: 10px 0;
}

.tdfs-view-history {
    display: inline-block;
    background: #004085;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s;
}

.tdfs-view-history:hover {
    background: #002752;
    transform: translateY(-2px);
}

/* ============================================================================
   PAYOUT FORM
   ============================================================================ */

.tdfs-payout-form-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(50,50,93,0.1), 0 5px 15px rgba(0,0,0,0.07);
}

.tdfs-form-title {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.tdfs-current-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    color: white;
}

.tdfs-balance-info,
.tdfs-request-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tdfs-balance-label,
.tdfs-request-label {
    font-size: 16px;
    opacity: 0.9;
}

.tdfs-balance-amount,
.tdfs-request-amount {
    font-size: 28px;
    font-weight: 700;
}

.tdfs-request-note {
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

.tdfs-form-section {
    margin-bottom: 30px;
}

.tdfs-section-title {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.tdfs-section-title:before {
    content: '';
    width: 4px;
    height: 20px;
    background: #667eea;
    margin-right: 10px;
    border-radius: 2px;
}

.tdfs-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.tdfs-payment-option {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.tdfs-payment-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.tdfs-payment-option input[type='radio'] {
    display: none;
}

.tdfs-payment-option input[type='radio']:checked + .tdfs-option-content {
    color: #667eea;
}

.tdfs-payment-option input[type='radio']:checked + .tdfs-option-content .tdfs-option-title {
    color: #667eea;
}

.tdfs-option-title {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.tdfs-option-desc {
    font-size: 12px;
    color: #6c757d;
}

.tdfs-payment-fields {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.tdfs-field-group {
    margin-bottom: 20px;
}

.tdfs-field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tdfs-field-half {
    flex: 1;
}

.tdfs-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.tdfs-field-required {
    color: #dc3545;
}

.tdfs-field-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.tdfs-field-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.tdfs-field-valid {
    border-color: #28a745 !important;
}

.tdfs-field-invalid {
    border-color: #dc3545 !important;
}

.tdfs-field-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.tdfs-saved-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tdfs-form-actions {
    text-align: center;
    margin-top: 30px;
}

.tdfs-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    min-width: 300px;
    justify-content: center;
}

.tdfs-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.tdfs-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.tdfs-loading {
    position: relative;
}

@keyframes tdfs-spin {
    to { transform: rotate(360deg); }
}

.tdfs-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: tdfs-spin 1s linear infinite;
}

.tdfs-btn-text {
    flex: 1;
    text-align: left;
}

.tdfs-btn-amount {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

.tdfs-form-note {
    margin-top: 15px;
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tdfs-message {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.tdfs-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.tdfs-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ============================================================================
   HISTORY TABLE
   ============================================================================ */

.tdfs-history-wrapper {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.tdfs-history-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.tdfs-no-history {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

.tdfs-no-history .dashicons {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tdfs-history-table-container {
    overflow-x: auto;
    margin-bottom: 25px;
}

.tdfs-history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.tdfs-history-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.tdfs-history-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.tdfs-history-table tr:hover {
    background: #f8f9fa;
}

.tdfs-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tdfs-status-pending {
    background: #fff3cd;
    color: #856404;
}

.tdfs-status-processing {
    background: #cce5ff;
    color: #004085;
}

.tdfs-status-paid {
    background: #d4edda;
    color: #155724;
}

.tdfs-details-tooltip {
    position: relative;
    display: inline-block;
}

.tdfs-details-toggle {
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

.tdfs-details-content {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 250px;
    top: 100%;
    left: 0;
    margin-top: 10px;
}

.tdfs-details-tooltip:hover .tdfs-details-content {
    display: block;
}

.tdfs-history-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f8f9fa;
}

.tdfs-stat-item {
    text-align: center;
}

.tdfs-stat-label {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 5px;
}

.tdfs-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* ============================================================================
   TRANSACTION HISTORY
   ============================================================================ */

.tdfs-transactions-wrapper {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.tdfs-transactions-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.tdfs-transactions-list {
    max-height: 500px;
    overflow-y: auto;
}

.tdfs-transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f8f9fa;
    gap: 15px;
}

.tdfs-transaction-item:hover {
    background: #f8f9fa;
}

.tdfs-txn-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tdfs-txn-credit .tdfs-txn-icon {
    background: #d4edda;
    color: #155724;
}

.tdfs-txn-debit .tdfs-txn-icon {
    background: #f8d7da;
    color: #721c24;
}

.tdfs-txn-payout .tdfs-txn-icon {
    background: #fff3cd;
    color: #856404;
}

.tdfs-txn-details {
    flex: 1;
}

.tdfs-txn-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.tdfs-txn-type {
    font-weight: 600;
    color: #333;
}

.tdfs-txn-date {
    color: #6c757d;
    font-size: 12px;
}

.tdfs-txn-description {
    color: #495057;
    font-size: 14px;
}

.tdfs-txn-reference {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.tdfs-txn-amount {
    font-weight: 700;
    font-size: 18px;
}

.tdfs-txn-credit .tdfs-txn-amount {
    color: #28a745;
}

.tdfs-txn-debit .tdfs-txn-amount,
.tdfs-txn-payout .tdfs-txn-amount {
    color: #dc3545;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .tdfs-wallet-section,
    .tdfs-paid-section,
    .tdfs-total-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .tdfs-amount-display {
        font-size: 36px;
    }
    
    .tdfs-total {
        font-size: 42px;
    }
    
    .tdfs-payout-form-wrapper {
        padding: 20px;
    }
    
    .tdfs-balance-info,
    .tdfs-request-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .tdfs-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tdfs-submit-btn {
        min-width: 100%;
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .tdfs-btn-text {
        text-align: center;
    }
    
    .tdfs-history-wrapper,
    .tdfs-transactions-wrapper {
        padding: 20px;
    }
    
    .tdfs-history-table th,
    .tdfs-history-table td {
        padding: 10px;
        font-size: 14px;
    }
    
    .tdfs-history-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .tdfs-transaction-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tdfs-txn-header {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .tdfs-payment-methods {
        grid-template-columns: 1fr;
    }
    
    .tdfs-amount-display {
        font-size: 28px;
    }
    
    .tdfs-balance-amount,
    .tdfs-request-amount {
        font-size: 22px;
    }
    
    .tdfs-history-table {
        font-size: 12px;
    }
    
    .tdfs-history-table th,
    .tdfs-history-table td {
        padding: 8px;
    }
}

/* ============================================================================
   ADMIN STYLES
   ============================================================================ */

.tdfs-admin-wrap {
    padding: 20px;
}

/* Statistics Cards */
.tdfs-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tdfs-stat-card {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.tdfs-stat-pending { border-left: 4px solid #ffc107; }
.tdfs-stat-processing { border-left: 4px solid #007bff; }
.tdfs-stat-paid { border-left: 4px solid #28a745; }
.tdfs-stat-total { border-left: 4px solid #6c757d; }

.tdfs-stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tdfs-stat-content h3 {
    margin: 0 0 5px 0;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tdfs-stat-amount {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #212529;
}

.tdfs-stat-count {
    margin: 5px 0 0 0;
    font-size: 12px;
    color: #6c757d;
}

/* Filters */
.tdfs-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tdfs-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.tdfs-filter-group {
    flex: 1;
    min-width: 150px;
}

.tdfs-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.tdfs-filter-group select,
.tdfs-filter-group input {
    width: 100%;
}

.tdfs-filter-actions {
    margin-top: 5px;
}

/* Table Styles */
.tdfs-requests-table {
    margin-top: 20px;
}

.tdfs-details-cell {
    max-width: 300px;
    font-size: 12px;
    line-height: 1.4;
}

.tdfs-details-cell div {
    margin-bottom: 3px;
}

.tdfs-status-select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-weight: 600;
    cursor: pointer;
    min-width: 120px;
}

.tdfs-status-pending {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.tdfs-status-processing {
    background-color: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}

.tdfs-status-paid {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.tdfs-amount {
    color: #28a745;
    font-weight: bold;
}

.tdfs-actions-cell {
    white-space: nowrap;
}

.tdfs-action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.tdfs-no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.tdfs-no-results .dashicons {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* Modal Styles */
.tdfs-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.tdfs-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    width: 500px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.tdfs-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tdfs-modal-header h3 {
    margin: 0;
}

.tdfs-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.tdfs-modal-body {
    padding: 20px;
}

.tdfs-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Bulk Actions */
.tdfs-bulk-actions {
    margin-top: 20px;
}

.tdfs-bulk-actions select,
.tdfs-bulk-actions button {
    margin-bottom: 10px;
}

/* Wallet Management */
.tdfs-wallet-summary {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.tdfs-summary-card {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.tdfs-summary-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.tdfs-summary-amount {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin: 0;
}

.tdfs-summary-count {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

.tdfs-eligible {
    color: #28a745;
}

.tdfs-not-eligible {
    color: #dc3545;
}

.tdfs-eligible-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Responsive Admin */
@media screen and (max-width: 1200px) {
    .tdfs-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tdfs-requests-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tdfs-wallet-summary {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    .tdfs-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .tdfs-filter-row {
        flex-direction: column;
    }
    
    .tdfs-filter-group {
        width: 100%;
    }
    
    .tdfs-requests-table {
        font-size: 12px;
    }
    
    .tdfs-action-buttons {
        flex-direction: column;
    }
}