.email-popup {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.75);

    opacity: 1;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

    z-index: 5000;
}

.email-popup.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.email-popup-content {
    position: absolute;

    width: min(100%, 600px);
    max-height: calc(100dvh - 48px);

    overflow-y: auto;

    padding: clamp(24px, 5vw, 42px);

    background: #121212;
    color: white;

    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45);
}

.email-popup-content h2 {
    margin: 0 40px 10px 0;

    font-size: clamp(1.7rem, 4vw, 2.3rem);

    color: var(--dark-accent-text);
}

.email-popup-description {
    margin: 0 0 28px;

    color: #c8c8c8;

    line-height: 1.6;
}

.email-popup-close {
    position: absolute;

    top: 16px;
    right: 18px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: transparent;
    color: white;

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.email-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);

    transform: scale(1.05);
}

.email-form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin-bottom: 22px;
}

.email-form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-text);
}

.email-form-group select,
.email-form-group textarea {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;

    background: #1c1c1c;
    color: white;

    font: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.email-form-group select:focus,
.email-form-group textarea:focus {
    border-color: #ffffff;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.08);
}

.email-form-group textarea {
    min-height: 130px;

    resize: vertical;
}

.email-popup-buttons {
    display: flex;
    justify-content: flex-end;

    gap: 12px;

    margin-top: 30px;

    text-align: center;
}

.email-cancel-button,
.email-send-button {
    padding: 12px 22px;

    border: none;
    border-radius: 9px;

    font: inherit;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.email-cancel-button {
    background: #292929;
    color: white;
}

.email-send-button {
    background: var(--accent-text);
    color: var(--light-text);
}

.email-cancel-button:hover,
.email-send-button:hover {
    transform: translateY(-2px);
}

.email-service-time {
    display: none;

    margin-top: 4px;

    opacity: 0;

    transform: translateY(-8px);
}

.email-service-time.active {
    display: block;

    animation: showServiceTime 0.3s ease forwards;
}

@keyframes showServiceTime {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.service-time-description {
    margin: -2px 0 10px;

    color: #aaa;

    font-size: 0.85rem;
}

.day-selector {
    display: grid;

    grid-template-columns: repeat(7, 1fr);

    gap: 7px;

    width: 100%;
}

.day-option {
    min-width: 0;
    min-height: 64px;

    padding: 10px 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;

    background: #1c1c1c;
    color: white;

    font: inherit;
    font-size: 0.78rem;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.day-option:hover {
    border-color: rgba(255, 255, 255, 0.55);

    transform: translateY(-2px);
}

.day-option.active {
    background: white;
    color: #111;

    border-color: white;
}

.day-short {
    display: none;
}

.time-selector {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
}


.time-option {
    min-height: 52px;

    padding: 12px 18px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9px;

    background: #1c1c1c;
    color: white;

    font: inherit;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}


.time-option:hover {
    border-color: rgba(255, 255, 255, 0.55);

    transform: translateY(-2px);
}


.time-option.active {
    background: white;
    color: #111;

    border-color: white;
}

@media (max-width: 600px) {

    .email-popup {
        padding: 14px;
        align-items: center;
    }

    .email-popup-content {
        width: 100%;

        max-height: calc(100dvh - 28px);

        padding: 28px 20px 22px;

        border-radius: 14px;
    }

    .email-popup-buttons {
        flex-direction: column-reverse;
    }

    .email-cancel-button,
    .email-send-button {
        width: 100%;
        min-height: 48px;
    }

    .day-selector {
        grid-template-columns: repeat(4, 1fr);

        gap: 7px;
    }

    .time-selector {
        grid-template-columns: repeat(2, 1fr);

        gap: 7px;
    }

    .day-option {
        min-height: 52px;
    }

    .day-full {
        display: none;
    }

    .day-short {
        display: inline;
    }
}

@media (max-width: 380px) {

    .day-selector {
        grid-template-columns: repeat(3, 1fr);
    }

}