/**
 * Payment Portal Styles
 */

/* Base styles */
body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Card styling */
.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

/* Invoice details */
.invoice-details {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

/* Stripe card element */
#card-element {
    height: auto;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
}

#card-element.StripeElement--focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#card-element.StripeElement--invalid {
    border-color: #dc3545;
}

/* Button states */
#submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#submit-btn .spinner-border {
    vertical-align: middle;
    margin-left: 8px;
}

/* Success checkmark animation */
.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Error state */
.alert-danger {
    border-radius: 8px;
}

/* Amount input */
#amount::-webkit-outer-spin-button,
#amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#amount[type=number] {
    -moz-appearance: textfield;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1.25rem;
    }

    .invoice-details .row > div {
        font-size: 0.9rem;
    }
}

/* Link styles */
a {
    color: #0d6efd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Form validation */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: none;
}

.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: #198754;
    background-image: none;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }

    .card {
        box-shadow: none !important;
    }
}