/**
 * Civic_Twin WordPress Plugin Public Stylesheet
 * Ensures iframe wrappers look professional, responsive, and beautifully integrated in any theme
 */

.ct-public-container {
    --accent-color: var(--ct-accent-color, #059669);
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
}

.ct-frame-header {
    background: #0f172a; /* Slate 900 */
    color: #ffffff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

.ct-frame-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.ct-frame-brand .ct-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
    display: inline-block;
    animation: ctPulse 1s infinite alternate;
}

.ct-btn-header-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(56, 189, 248, 0.1);
    padding: 6px 14px;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.ct-btn-header-link:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    text-decoration: none;
}

.ct-iframe-wrapper {
    position: relative;
    width: 100%;
    background: #f8fafc;
    overflow: hidden;
}

.ct-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading Overlay */
.ct-loader-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #475569;
}

.ct-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: ctSpin 0.8s linear infinite;
    margin-bottom: 15px;
}

.ct-loader-overlay p {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.ct-error-notice {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 1rem;
    padding: 20px;
    font-weight: 700;
    font-size: 14px;
    margin: 20px 0;
}

@keyframes ctSpin {
    to { transform: rotate(360deg); }
}

@keyframes ctPulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
