/**
 * CloudStay Pay Balance Page Styles
 */

.cs-pay-balance {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cs-pay-balance__container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.cs-pay-balance__card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    text-align: center;
}

.cs-pay-balance__card--wide {
    max-width: 520px;
    text-align: left;
}

.cs-pay-balance__icon {
    margin-bottom: 16px;
}

.cs-pay-balance__icon--success {
    color: #16a34a;
}

.cs-pay-balance__icon--error {
    color: #dc2626;
}

.cs-pay-balance__title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.cs-pay-balance__text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Spinner */
.cs-pay-balance__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: cs-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

/* Summary */
.cs-pay-balance__summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.cs-pay-balance__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.cs-pay-balance__summary-row:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

.cs-pay-balance__summary-row--total {
    padding-top: 12px;
}

.cs-pay-balance__summary-label {
    font-size: 13px;
    color: #6b7280;
}

.cs-pay-balance__summary-value {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.cs-pay-balance__amount {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* Form Sections */
.cs-pay-balance__section {
    margin: 20px 0;
}

.cs-pay-balance__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.cs-pay-balance__input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.cs-pay-balance__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.cs-pay-balance__hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 6px 0 0;
}

/* Stripe Elements */
.cs-pay-balance__stripe-wrapper {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s;
}

.cs-pay-balance__stripe-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.cs-pay-balance__card-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.cs-pay-balance__card-col {
    flex: 1;
}

.cs-pay-balance__card-col .cs-pay-balance__stripe-element {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s;
}

.cs-pay-balance__card-col .cs-pay-balance__stripe-element:focus-within {
    border-color: #2563eb;
}

.cs-pay-balance__secure {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}

/* Error */
.cs-pay-balance__form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 16px 0;
}

/* Submit Button */
.cs-pay-balance__submit {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.cs-pay-balance__submit:hover:not(:disabled) {
    background: #1d4ed8;
}

.cs-pay-balance__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cs-pay-balance__btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cs-spin 0.6s linear infinite;
}

/* Responsive */
@media (max-width: 480px) {
    .cs-pay-balance {
        padding: 20px 16px;
    }
    .cs-pay-balance__card {
        padding: 24px 20px;
    }
    .cs-pay-balance__card-row {
        flex-direction: column;
        gap: 8px;
    }
}
