/* jarografquote.css — dopasowany do design systemu jarograf.pl */

/* ------------------------------------------------------------------ */
/* Przycisk na stronie produktu                                         */
/* ------------------------------------------------------------------ */
.btn-jq-inquiry {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    color: #1A3A6B;
    border: 1.5px solid #1A3A6B;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    vertical-align: middle;
    white-space: nowrap;
}

.btn-jq-inquiry:hover,
.btn-jq-inquiry:focus {
    background: #1A3A6B;
    color: #ffffff;
    outline: none;
}

.btn-jq-inquiry:hover .jq-pulse {
    background: #ffffff;
}

.jq-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #F97316;
    flex-shrink: 0;
    animation: jq-pulse 1.8s infinite;
}

@keyframes jq-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(1.4); }
}

/* ------------------------------------------------------------------ */
/* Overlay                                                              */
/* ------------------------------------------------------------------ */
.jq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 14, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.jq-overlay.jq-active {
    opacity: 1;
    pointer-events: all;
}

/* ------------------------------------------------------------------ */
/* Modal                                                                */
/* ------------------------------------------------------------------ */
.jq-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
}

.jq-overlay.jq-active .jq-modal {
    transform: translateY(0) scale(1);
}

/* ------------------------------------------------------------------ */
/* Nagłówek modala                                                      */
/* ------------------------------------------------------------------ */
.jq-modal-top {
    background: #1A3A6B;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-radius: 12px 12px 0 0;
}

.jq-modal-title {
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 3px;
    line-height: 1.3;
}

.jq-modal-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    margin: 0;
}

.jq-product-pill {
    display: inline-block;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jq-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: background 0.15s, opacity 0.15s;
}

.jq-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    opacity: 1;
}

/* ------------------------------------------------------------------ */
/* Ciało formularza                                                     */
/* ------------------------------------------------------------------ */
.jq-modal-body {
    padding: 18px 22px 4px;
}

.jq-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.jq-field-full {
    margin-bottom: 12px;
}

.jq-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jq-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.jq-req {
    color: #F97316;
}

.jq-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #9CA3AF;
    font-size: 11px;
}

.jq-input {
    border: 1.5px solid #E5E7EB;
    border-radius: 6px;
    padding: 8px 11px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: #1F2937;
    background: #F9FAFB;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
}

.jq-input:focus {
    border-color: #1A3A6B;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.12);
}

.jq-input::placeholder {
    color: #9CA3AF;
}

.jq-input.jq-error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.jq-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    cursor: pointer;
    padding-right: 28px;
}

.jq-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Pilność                                                              */
/* ------------------------------------------------------------------ */
.jq-urgency-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.jq-urgency-btn {
    flex: 1;
    border: 1.5px solid #E5E7EB;
    border-radius: 6px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    background: #F9FAFB;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.jq-urgency-btn:hover {
    border-color: #9CA3AF;
    background: #F3F4F6;
}

.jq-urgency-btn.jq-urgency-selected {
    border-color: #1A3A6B;
    background: #EEF4FF;
}

.jq-urg-icon {
    font-size: 16px;
    line-height: 1;
}

.jq-urg-label {
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.jq-urgency-btn.jq-urgency-selected .jq-urg-label {
    color: #1A3A6B;
}

/* ------------------------------------------------------------------ */
/* Stopka                                                               */
/* ------------------------------------------------------------------ */
.jq-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #F9FAFB;
    border-radius: 0 0 12px 12px;
    flex-wrap: wrap;
}

.jq-rodo-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 5px;
}

.jq-btn-send {
    background: #F97316 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 26px !important;
    border-radius: 8px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    white-space: nowrap;
}

.jq-btn-send:hover {
    background: #EA6C0A !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.jq-btn-send:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Stan sukcesu                                                         */
/* ------------------------------------------------------------------ */
.jq-success {
    padding: 36px 24px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jq-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F0FDF4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: jq-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes jq-pop {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
}

.jq-success-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1A3A6B;
    margin: 0 0 8px;
}

.jq-success-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #6B7280;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
}

.jq-success-time {
    margin-top: 16px;
    background: #EEF4FF;
    border-radius: 7px;
    padding: 9px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #1A3A6B;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ------------------------------------------------------------------ */
/* Responsywność                                                        */
/* ------------------------------------------------------------------ */
@media (max-width: 540px) {
    .jq-field-row {
        grid-template-columns: 1fr;
    }
    .jq-urgency-btn .jq-urg-label {
        font-size: 9px;
    }
    .jq-modal-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .jq-btn-send {
        width: 100%;
    }
}
