/**
 * RSustain LMS Connector — Mount container styles.
 * Minimal presentational CSS for loading/error states.
 */

/* Mount container base */
.rsustain-mount {
    position: relative;
    min-height: 200px;
    margin: 1.5rem 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
                 Ubuntu, Cantarell, sans-serif;
}

/* Loading indicator */
.rsustain-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6b7280;
    font-size: 1rem;
}

.rsustain-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid #e5e7eb;
    border-top-color: #2d5016;
    border-radius: 50%;
    animation: rsustain-spin 0.8s linear infinite;
}

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

/* Error state */
.rsustain-error {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 4px;
    color: #991b1b;
    font-size: 0.95rem;
}

.rsustain-error a {
    color: #2d5016;
    font-weight: 600;
}

/* Mount active — hide loading when app has rendered */
.rsustain-mount--active .rsustain-loading {
    display: none;
}

/* Certificate verification template */
.rsustain-verify-page {
    max-width: 680px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rsustain-verify-page h1 {
    color: #2d5016;
    margin-bottom: 1.5rem;
}

.rsustain-cert-valid {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.rsustain-cert-invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.rsustain-cert-error {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.rsustain-cert-detail {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.rsustain-cert-detail strong {
    display: inline-block;
    min-width: 160px;
    color: #374151;
}
