/* File: mypopup/assets/css/style.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

.mypopup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.mypopup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mypopup-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 48px 40px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.10),
        0 40px 80px rgba(0, 0, 0, 0.08);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    will-change: transform, opacity;
}

.mypopup-overlay.is-open .mypopup-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.mypopup-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

.mypopup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.mypopup-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
    transform: scale(1.08);
}

.mypopup-close:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.mypopup-content {
    position: relative;
    z-index: 1;
}

.mypopup-content h1,
.mypopup-content h2,
.mypopup-content h3 {
    margin-top: 0;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.mypopup-content h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.mypopup-content p {
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.mypopup-content a {
    color: #6366f1;
    text-decoration: none;
}

.mypopup-content a:hover {
    text-decoration: underline;
}

.mypopup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.mypopup-content .wp-block-buttons,
.mypopup-content .wp-block-button {
    margin-top: 24px;
}

.mypopup-content .wp-block-button__link,
.mypopup-content input[type="submit"],
.mypopup-content button[type="submit"] {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.mypopup-content .wp-block-button__link:hover,
.mypopup-content input[type="submit"]:hover,
.mypopup-content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45);
    filter: brightness(1.05);
    color: #fff;
    text-decoration: none;
}

.mypopup-content input[type="email"],
.mypopup-content input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    margin-bottom: 12px;
}

.mypopup-content input[type="email"]:focus,
.mypopup-content input[type="text"]:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

@media (max-width: 600px) {
    .mypopup-container {
        padding: 36px 24px 28px;
        border-radius: 14px;
    }
}
