/**
 * Public styles for TH Stripe Connect.
 *
 * Styles for shortcode displays (onboarding and dashboard).
 * Uses a consistent design language with card-based layouts.
 *
 * @package TH_Stripe_Connect
 * @since   1.0.0
 */

/* ==========================================================================
   Card Layout
   ========================================================================== */

.th-stripe-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.th-stripe-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.th-stripe-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.th-stripe-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.th-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.th-status-pending {
    background: #fff3e0;
    color: #e65100;
}

.th-status-restricted {
    background: #fff8e1;
    color: #f57f17;
}

.th-status-disabled {
    background: #ffebee;
    color: #c62828;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.th-stripe-form {
    margin-top: 16px;
}

.th-stripe-form-row {
    margin-bottom: 16px;
}

.th-stripe-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.th-stripe-select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.th-stripe-select:focus {
    border-color: #635bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.2);
}

.th-stripe-form-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.th-stripe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
}

.th-stripe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.th-stripe-btn-primary {
    background: #635bff;
    color: #fff;
}

.th-stripe-btn-primary:hover:not(:disabled) {
    background: #5147e5;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.4);
}

.th-stripe-btn-secondary {
    background: #f4f4f5;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.th-stripe-btn-secondary:hover:not(:disabled) {
    background: #e8e8e9;
}

/* ==========================================================================
   Info Grid
   ========================================================================== */

.th-stripe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.th-stripe-info-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
}

.th-stripe-info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #757575;
    margin-bottom: 4px;
}

.th-stripe-info-value {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
}

.th-stripe-enabled {
    color: #2e7d32;
}

.th-stripe-disabled {
    color: #c62828;
}

/* ==========================================================================
   Notices / Messages
   ========================================================================== */

.th-stripe-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.th-stripe-notice-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.th-stripe-notice-warning {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.th-stripe-notice-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.th-stripe-notice-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.th-stripe-messages {
    margin-top: 16px;
}

/* ==========================================================================
   Dashboard Actions
   ========================================================================== */

.th-stripe-dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.th-stripe-dashboard-status {
    margin-bottom: 16px;
}

/* ==========================================================================
   Stripe Elements (Checkout)
   ========================================================================== */

#th-stripe-card-element {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    min-height: 40px;
}

#th-stripe-card-element.StripeElement--focus {
    border-color: #635bff;
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.2);
}

#th-stripe-card-element.StripeElement--invalid {
    border-color: #c62828;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .th-stripe-card {
        padding: 16px;
    }

    .th-stripe-info-grid {
        grid-template-columns: 1fr;
    }

    .th-stripe-form-actions,
    .th-stripe-dashboard-actions {
        flex-direction: column;
    }

    .th-stripe-btn {
        width: 100%;
    }
}
