/* Button that opens the popup */
.macos-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #f5f5f7;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.macos-trigger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    background: #ffffff;
}

/* Overlay */
.fsd-macos-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.fsd-macos-overlay.is-active {
    display: flex;
}

/* macOS-like window */
.fsd-macos-modal {
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: rgba(245,245,247,0.95);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.fsd-macos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(180deg, #f5f5f7, #e3e3e5);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* MacOS traffic lights */
.fsd-macos-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.fsd-macos-dots .dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
}

.fsd-macos-dots .dot-close   { background: #ff5f57; }
.fsd-macos-dots .dot-minimize{ background: #febc2e; }
.fsd-macos-dots .dot-full    { background: #28c840; }

.fsd-macos-header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

/* Close button */
.fsd-macos-close {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #4b5563;
}

/* Body (shortcode output) */
.fsd-macos-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow: auto;
}

/* Tweak tables/lists inside the popup */
.fsd-macos-body table {
    width: 100%;
    border-collapse: collapse;
}

.fsd-macos-body table th,
.fsd-macos-body table td {
    padding: 0.5rem 0.5rem;
}

/* Prevent body scroll when popup is open (if used) */
body.fsd-macos-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fsd-macos-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .fsd-macos-body {
        padding: 0.75rem 0.75rem 1rem;
    }
}
