/**
 * Amelia Popup Styles
 *
 * @package AmeliaCPTSync
 */

/* Container */
#amelia-form-container {
    min-height: 400px;
    position: relative;
    background: transparent;
}

#amelia-form-container iframe {
    width: 100%;
    border: none;
    background: transparent;
    display: block;
    transition: height 0.3s ease;
}

/* Loading State */
.amelia-loading {
    text-align: center;
    padding: 80px 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.amelia-loading .spinner {
    float: none;
    margin: 0 auto 20px;
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: ameliaSpinner 1s linear infinite;
}

.amelia-loading .spinner.is-active {
    display: block;
    visibility: visible;
}

.amelia-loading p {
    color: #666;
    font-size: 16px;
    margin: 20px 0 0;
    font-weight: 500;
}

/* Error State */
.amelia-error {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin: 20px;
}

.amelia-error p {
    margin: 10px 0;
}

.amelia-error strong {
    color: #856404;
}

.amelia-error small {
    color: #999;
}

/* Ensure Amelia form displays properly in popup */
#amelia-form-container .amelia-app-booking {
    width: 100% !important;
    max-width: none !important;
}

/* Spinner animation */
@keyframes ameliaSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation for smooth loading */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.amelia-loading {
    animation: fadeIn 0.3s ease-in;
}

