/* =========================================================
   Dogadani Waitlist – Modal CSS
   ========================================================= */

/* Overlay */
.dwl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: dwl-fade-in .18s ease;
}

.dwl-modal-overlay[hidden] {
    display: none !important;
}

@keyframes dwl-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Box */
.dwl-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px 32px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    animation: dwl-slide-up .22s ease;
}

@keyframes dwl-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.dwl-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.dwl-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

/* Title & desc */
.dwl-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a2e26;
    padding-right: 32px;
}
.dwl-modal-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* Form rows */
.dwl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dwl-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.dwl-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.dwl-form-group input[type="text"],
.dwl-form-group input[type="email"],
.dwl-form-group input[type="tel"] {
    padding: 10px 14px;
    border: 1.5px solid #d0d0c8;
    border-radius: 6px;
    font-size: 15px;
    color: #222;
    background: #fafaf8;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.dwl-form-group input:focus {
    border-color: #2c5f4a;
    box-shadow: 0 0 0 3px rgba(44, 95, 74, .12);
    background: #fff;
}

.dwl-form-group input.dwl-input-error {
    border-color: #c0392b;
}

.dwl-field-error {
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
    min-height: 16px;
}

.dwl-required {
    color: #c0392b;
}

/* Honeypot */
.dwl-hp {
    position: absolute;
    left: -9999px;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Consents */
.dwl-consents {
    margin: 4px 0 16px;
}

.dwl-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    line-height: 1.5;
}

.dwl-consent-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #2c5f4a;
    cursor: pointer;
}

/* RODO note */
.dwl-rodo-note {
    font-size: 11px;
    color: #aaa;
    line-height: 1.5;
    margin: 0 0 20px;
}

.dwl-rodo-note a {
    color: #2c5f4a;
}

/* Submit button */
.dwl-form-footer {
    text-align: center;
}

.dwl-btn-submit {
    background: #2c5f4a;
    color: #fff;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: .2px;
}

.dwl-btn-submit:hover {
    background: #234d3b;
}

.dwl-btn-submit:active {
    transform: scale(.98);
}

.dwl-btn-submit:disabled {
    background: #a0b8b0;
    cursor: not-allowed;
}

/* Spinner */
.dwl-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dwl-spin .7s linear infinite;
}

@keyframes dwl-spin {
    to { transform: rotate(360deg); }
}

/* Form message */
.dwl-form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.dwl-form-message.dwl-msg-success {
    background: #e8f4ef;
    color: #1a4a34;
    border: 1px solid #b8dece;
}

.dwl-form-message.dwl-msg-error {
    background: #fdf0ef;
    color: #8b2020;
    border: 1px solid #f0c0bc;
}

/* Notice on page (after confirmation redirect) */
.dwl-notice {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    max-width: 500px;
    width: calc(100% - 40px);
    text-align: center;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    animation: dwl-slide-up .25s ease;
}

.dwl-notice--success {
    background: #2c5f4a;
    color: #fff;
}

.dwl-notice--error {
    background: #c0392b;
    color: #fff;
}

/* Responsive */
@media (max-width: 520px) {
    .dwl-modal-box {
        padding: 28px 20px 24px;
    }
    .dwl-form-row {
        grid-template-columns: 1fr;
    }
}
