/* Group Payment Dashboard Styles - Enhanced payment management UI */

/* ============ PAYMENT SETTINGS ============ */
.payment-settings-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #e9ecef;
}

.payment-mode-selector {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.payment-mode-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-mode-option:hover {
    border-color: #10B981;
    background-color: #f0fdf4;
}

.payment-mode-option input[type="radio"]:checked + label {
    border-color: #10B981;
    background-color: #dcfce7;
}

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

.payment-mode-option label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    cursor: pointer;
}

.payment-mode-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.vasel-badge {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.cash-up-badge {
    background: #f59e0b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.payment-settings-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: end;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ============ MEMBER CONTRIBUTIONS ============ */
.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.member-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s ease;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.member-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.member-status.authorized {
    background: #dcfce7;
    color: #166534;
}

.member-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.member-status.declined {
    background: #fee2e2;
    color: #dc2626;
}

.member-stats {
    margin: 12px 0;
    font-size: 14px;
    color: #6b7280;
}

.member-stats > div {
    margin-bottom: 4px;
}

.payment-method {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 12px;
}

/* ============ PAYOUT MANAGEMENT ============ */
.payouts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.payouts-list {
    display: grid;
    gap: 12px;
}

.payout-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 16px;
    align-items: center;
}

.payout-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payout-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    width: fit-content;
}

.payout-status.succeeded {
    background: #dcfce7;
    color: #166534;
}

.payout-status.pending,
.payout-status.processing {
    background: #fef3c7;
    color: #92400e;
}

.payout-status.failed {
    background: #fee2e2;
    color: #dc2626;
}

.payout-amounts {
    font-size: 14px;
}

.payout-amounts > div {
    margin-bottom: 2px;
}

.payout-date {
    text-align: right;
    color: #6b7280;
    font-size: 14px;
}

/* ============ CONNECT STATUS ============ */
.connect-setup,
.connect-pending,
.connect-ready {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.connect-setup {
    border-color: #3b82f6;
    background: #eff6ff;
}

.connect-pending {
    border-color: #f59e0b;
    background: #fffbeb;
}

.connect-ready {
    border-color: #10b981;
    background: #f0fdf4;
}

.status-details {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 14px;
}

/* ============ MODAL STYLES ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #111827;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.fee-info {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 12px 0;
}

.fee-info small {
    color: #6b7280;
}

/* ============ LOADING & NOTIFICATIONS ============ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.loading-content {
    text-align: center;
    padding: 24px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1200;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}

/* ============ COLLECTION RESULTS ============ */
.collection-results {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.collection-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-stat {
    text-align: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.summary-stat .value {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.summary-stat .label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
    .payment-mode-selector {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .payout-card {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .payout-date {
        text-align: left;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .collection-summary {
        grid-template-columns: 1fr;
    }
    
    .members-header,
    .payouts-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

/* ============ UTILITY CLASSES ============ */
.text-danger {
    color: #dc2626;
}

.text-warning {
    color: #f59e0b;
}

.text-success {
    color: #10b981;
}

.text-muted {
    color: #6b7280;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-primary {
    background: #10B981;
    color: white;
    border: 1px solid #10B981;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #059669;
    border-color: #059669;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}