/* LMS Plugin Loading States */

/* Loading Spinner */
.lms-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 20px auto;
}

.lms-loading-spinner:after {
    content: " ";
    display: block;
    width: 32px;
    height: 32px;
    margin: 4px;
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-color: #0073aa transparent #0073aa transparent;
    animation: lms-spinner 1.2s linear infinite;
}

@keyframes lms-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Container */
.lms-form-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lms-loading-text {
    color: #666;
    font-size: 16px;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Skeleton Screen */
.lms-skeleton {
    background: #eee;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: lms-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes lms-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.lms-skeleton-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.lms-skeleton-field {
    margin-bottom: 20px;
}

.lms-skeleton-label {
    height: 16px;
    width: 100px;
    margin-bottom: 8px;
}

.lms-skeleton-input {
    height: 40px;
    width: 100%;
}

.lms-skeleton-button {
    height: 44px;
    width: 120px;
    margin-top: 10px;
}

/* Error States */
.lms-error-container {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.lms-error-icon {
    color: #e53e3e;
    font-size: 48px;
    margin-bottom: 16px;
}

.lms-error-message {
    color: #742a2a;
    font-size: 16px;
    margin-bottom: 16px;
}

.lms-error-details {
    color: #975a5a;
    font-size: 14px;
    margin-bottom: 20px;
}

.lms-retry-button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.lms-retry-button:hover {
    background: #c53030;
}

/* Fade Transitions */
.lms-fade-enter {
    opacity: 0;
}

.lms-fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

.lms-fade-exit {
    opacity: 1;
}

.lms-fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Success State */
.lms-form-loaded {
    animation: lms-fadeIn 0.3s ease-in;
}

@keyframes lms-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .lms-form-loading {
        padding: 30px 15px;
        min-height: 250px;
    }
    
    .lms-loading-text {
        font-size: 14px;
    }
    
    .lms-skeleton-form {
        padding: 15px;
    }
}