/* Managed SSL PoC - Enhanced Styles */
/* Phase 4: Glassmorphism & Professional Polish */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* Base Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.font-mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(13, 17, 28, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Custom Scrollbar for Terminal */
#terminal::-webkit-scrollbar {
    width: 4px;
}

#terminal::-webkit-scrollbar-track {
    background: transparent;
}

#terminal::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

#terminal::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Active Glow Animation */
@keyframes pulse-cyan {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 211, 238, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
    }
}

.active-glow {
    animation: pulse-cyan 2s ease-in-out;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Input Focus States */
input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

/* Button Hover Effects */
button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:not(:disabled):active {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Terminal Log Animations */
#terminal>div {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Connection Status Pulse */
@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Slide In Animation */
@keyframes slide-in-from-top {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slide-in-from-top 0.3s ease-out;
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Domain Card Hover Effect */
.glass-card:hover {
    border-color: rgba(100, 116, 139, 0.5);
}

/* CSR Textarea Placeholder */
textarea::placeholder {
    color: rgba(148, 163, 184, 0.4);
    font-size: 0.75rem;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {

    .lg\:col-span-7,
    .lg\:col-span-5 {
        grid-column: span 12;
    }
}

/* Print Styles (for documentation) */
@media print {

    nav,
    #terminal {
        display: none;
    }

    .glass-card {
        background: white;
        border: 1px solid #e2e8f0;
    }
}

/* ===== STATUS BADGES ===== */
/* Color-coded status indicators for certificates */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-issued {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Certificate Info Display */
.cert-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.cert-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.cert-info-label {
    color: #94a3b8;
}

.cert-info-value {
    color: #e2e8f0;
    font-weight: 500;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-download:active {
    transform: translateY(0);
}


/* ===== PRESENTATION MODE ===== */
/* Optimized for big screen demos and CEO presentations */

body.presentation-mode #terminal {
    height: 600px !important;
    /* Fixed height instead of 70vh */
    font-size: 14px !important;
    /* Slightly smaller than 16px */
    line-height: 1.6 !important;
}

body.presentation-mode #terminal>div {
    padding: 12px 16px;
    margin-bottom: 8px;
}

body.presentation-mode .log-timestamp {
    font-size: 14px !important;
}

body.presentation-mode .log-badge {
    font-size: 12px !important;
    padding: 6px 12px !important;
}

/* Subtle glow for better visibility on projector */
body.presentation-mode .text-emerald-500 {
    color: #10b981 !important;
    text-shadow: 0 0 3px rgba(16, 185, 129, 0.3);
}

body.presentation-mode .text-red-500 {
    color: #ef4444 !important;
    text-shadow: 0 0 3px rgba(239, 68, 68, 0.3);
}

body.presentation-mode .text-cyan-400 {
    color: #22d3ee !important;
    text-shadow: 0 0 3px rgba(34, 211, 238, 0.3);
}

/* Optional: Strong glow for CRITICAL events only */
body.presentation-mode .log-critical {
    color: #ff0066 !important;
    text-shadow: 0 0 8px rgba(255, 0, 102, 0.6);
    font-weight: 600;
}

/* ===== DCV REUSE HIGHLIGHTING (CEO Demo) ===== */
/* Highlight DCV reuse detection to explain "why no CNAME setup" */

body.presentation-mode .log-dcv-reuse {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%) !important;
    border-left: 4px solid #fbbf24 !important;
    padding-left: 16px !important;
    animation: highlight-pulse 2s ease-in-out 3;
}

@keyframes highlight-pulse {

    0%,
    100% {
        background: linear-gradient(90deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%);
    }

    50% {
        background: linear-gradient(90deg, rgba(251, 191, 36, 0.25) 0%, transparent 100%);
    }
}

body.presentation-mode .log-dcv-reuse::before {
    content: "⚡ ";
    color: #fbbf24;
    font-size: 16px;
    margin-right: 8px;
}

/* Presentation mode toggle button active state */
body.presentation-mode #presentation-toggle {
    background: #10b981 !important;
}

body.presentation-mode #presentation-toggle::before {
    content: "✓ ";
}

/* ===== HEALTH CHECK PULSING ANIMATION ===== */
/* Dramatic radar effect for SSL verification */

@keyframes radar-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

@keyframes radar-scan {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.health-check-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    position: relative;
}

.health-check-loading::before {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    animation: radar-pulse 1.5s ease-in-out infinite;
}

.health-check-loading::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: radar-scan 1s linear infinite;
}

.health-check-success {
    animation: success-pop 0.5s ease-out;
}

@keyframes success-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}