/* Modal Overlay */
.golm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Content Container */
.golm-modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    font-family: "Fira Code", monospace;
}

/* Modal Header */
.golm-modal-header {
    padding: 28px 32px;
    border-bottom: 1px solid #dedede;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.golm-modal-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
    font-family: "Vollkorn", serif;
    color: #1e73be;
    letter-spacing: -0.64px;
    padding-right: 40px;
}

/* Close Button (X) */
.golm-close-button {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #dedede;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.golm-close-button:hover {
    background: #1e73be;
    color: #ffffff;
    transform: translateY(-1px);
}

.golm-close-button svg {
    width: 24px;
    height: 24px;
}

/* Modal Body */
.golm-modal-body {
    padding: 32px;
    color: #000;
    line-height: 1.5;
    font-size: 16px;
    letter-spacing: -0.18px;
}

.golm-modal-body p {
    margin: 0 0 1em 0;
}

.golm-modal-body p:last-child {
    margin-bottom: 0;
}

.golm-modal-body a {
    color: #1e73be;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.golm-modal-body a:hover {
    color: #155a94;
}

/* Modal Footer */
.golm-modal-footer {
    padding: 24px 32px;
    border-top: 1px solid #dedede;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

/* Buttons - GuideOS Style */
.golm-modal-footer .button {
    display: inline-block;
    text-decoration: none;
    font-family: "Fira Code", monospace;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.36px;
    line-height: 1.5;
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.golm-modal-footer .button-primary {
    background: #1e73be;
    color: #ffffff;
}

.golm-modal-footer .button-primary:hover,
.golm-modal-footer .button-primary:focus {
    background: #155a94;
    color: #ffffff;
    transform: translateY(-1px);
}

.golm-close-footer-button {
    background: #1e73be;
    color: #ffffff;
}

.golm-close-footer-button:hover,
.golm-close-footer-button:focus {
    background: #155a94;
    color: #ffffff;
    transform: translateY(-1px);
}

/* CTA Button */
.golm-cta-button {
    font-weight: 400;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .golm-modal-content {
        max-width: 100%;
        margin: 0 10px;
    }

    .golm-modal-header h2 {
        font-size: 18px;
        padding-right: 35px;
    }

    .golm-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .golm-modal-footer .button {
        width: 100%;
        text-align: center;
    }
}

/* Accessibility */
.golm-close-button:focus {
    outline: 2px solid #1e73be;
    outline-offset: 2px;
}

.golm-modal-footer .button:focus {
    outline: 2px solid #1e73be;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .golm-modal-overlay {
        background-color: rgba(0, 0, 0, 0.85);
    }

    .golm-modal-content {
        background: #121212;
        color: #f6f6f6;
    }

    .golm-modal-header {
        border-bottom-color: rgba(222, 222, 222, 0.2);
    }

    .golm-modal-header h2 {
        color: #1e73be;
    }

    .golm-modal-body {
        color: #f6f6f6;
    }

    .golm-modal-body a {
        color: #3a96e8;
    }

    .golm-modal-body a:hover {
        color: #5aaef2;
    }

    .golm-modal-footer {
        border-top-color: rgba(222, 222, 222, 0.2);
    }

    .golm-close-button {
        background: rgba(222, 222, 222, 0.15);
        color: #f6f6f6;
    }

    .golm-close-button:hover {
        background: #1e73be;
        color: #ffffff;
    }

    .golm-close-footer-button {
        background: #1e73be;
        color: #ffffff;
    }

    .golm-close-footer-button:hover,
    .golm-close-footer-button:focus {
        background: #2880c9;
        color: #ffffff;
    }

    .golm-modal-footer .button-primary {
        background: #1e73be;
        color: #ffffff;
    }

    .golm-modal-footer .button-primary:hover,
    .golm-modal-footer .button-primary:focus {
        background: #2880c9;
        color: #ffffff;
    }
}
