/* ============================================================
   Nina – Inquiry Only | v1.1.0
   Popup modal stil – prirodan, organski, clean
   ============================================================ */

/* --- Badge --- */
.nio-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f0e8;
    border: 1px solid #d4c4a0;
    border-radius: 30px;
    padding: 6px 16px;
    margin-bottom: 14px;
    font-size: 12px;
    color: #7a6540;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}
.nio-badge-icon { font-size: 13px; }

/* --- Trigger wrap (na product page) --- */
.nio-trigger-wrap {
    margin: 10px 0 20px;
}

/* --- Trigger dugme – nasljeđuje WC .single_add_to_cart_button stil --- */
button.nio-open-modal.single_add_to_cart_button {
    width: 100%;
    cursor: pointer;
    margin-top: 4px !important;
    letter-spacing: 0.04em;
}

/* --- Loop dugme --- */
a.nio-loop-btn.button {
    background: transparent !important;
    color: #b8925a !important;
    border: 2px solid #b8925a !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.2s ease !important;
    padding: 10px 16px !important;
}
a.nio-loop-btn.button:hover {
    background: #b8925a !important;
    color: #ffffff !important;
}

/* ============================================================
   OVERLAY & MODAL
   ============================================================ */

.nio-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(30, 22, 10, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: nioOverlayIn 0.25s ease;
}

.nio-overlay.nio-open {
    display: flex;
}

@keyframes nioOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.nio-modal {
    background: #fdf9f4;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 20px 60px rgba(30, 22, 10, 0.25),
        0 4px 16px rgba(30, 22, 10, 0.12);
    animation: nioModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 3px solid #b8925a;
}

@keyframes nioModalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Close button --- */
.nio-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ede6d8;
    color: #7a6540;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
    padding: 0;
}
.nio-modal-close:hover {
    background: #b8925a;
    color: #ffffff;
}

/* --- Modal inner padding --- */
.nio-modal-inner {
    padding: 32px 28px 28px;
}

/* --- Modal header --- */
.nio-modal-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
}

.nio-modal-heading {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #3a2e1e !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.3 !important;
}

.nio-modal-subheading {
    font-size: 14px !important;
    color: #7a6540 !important;
    line-height: 1.6 !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

/* --- Product chip --- */
.nio-product-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0e8d8;
    border: 1px solid #d4c4a0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #5a4520;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
    max-width: 100%;
    word-break: break-word;
}
.nio-product-chip::before {
    content: '🛍';
    font-size: 13px;
    flex-shrink: 0;
}

/* --- Fields --- */
.nio-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.nio-field-group { position: relative; }

.nio-input {
    width: 100% !important;
    padding: 13px 16px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #3a2e1e !important;
    background: #ffffff !important;
    border: 1.5px solid #ddd3c0 !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}
.nio-input::placeholder { color: #b0a090 !important; }
.nio-input:focus {
    border-color: #b8925a !important;
    box-shadow: 0 0 0 3px rgba(184, 146, 90, 0.14) !important;
}
.nio-textarea {
    resize: vertical !important;
    min-height: 88px !important;
}

/* --- Submit --- */
.nio-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #b8925a 0%, #9a7540 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 12px rgba(184, 146, 90, 0.3) !important;
}
.nio-submit-btn::after {
    content: '→';
    font-size: 16px;
    transition: transform 0.2s ease;
}
.nio-submit-btn:hover {
    background: linear-gradient(135deg, #9a7540 0%, #7a5a28 100%) !important;
    box-shadow: 0 4px 18px rgba(184, 146, 90, 0.45) !important;
    transform: translateY(-1px) !important;
}
.nio-submit-btn:hover::after { transform: translateX(4px); }
.nio-submit-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(184, 146, 90, 0.25) !important;
}
.nio-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* --- Feedback message --- */
.nio-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.55;
    animation: nioFadeIn 0.3s ease;
}
.nio-message.nio-success {
    background: #f0faf0;
    border: 1px solid #a8d8a8;
    color: #2d6a2d;
}
.nio-message.nio-error {
    background: #fdf0f0;
    border: 1px solid #e8a8a8;
    color: #8b2020;
}

@keyframes nioFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 520px) {
    .nio-modal-inner { padding: 28px 18px 22px; }
    .nio-modal-heading { font-size: 18px !important; }
}

/* --- Prevent body scroll when modal open --- */
body.nio-modal-open {
    overflow: hidden;
}
