/**
 * Quote Request page styles
 *
 * @package PartsDozer
 */

/* ==========================================================
   Page wrapper
========================================================== */
.quote-page {
    background: var(--light-bg);
    padding-bottom: 80px;
    min-height: 60vh;
}

/* ==========================================================
   Dark hero with breadcrumbs + title
========================================================== */
.quote-hero {
    background: #111112;
    color: #fff;
    padding: 24px 0 40px;
    margin-bottom: 40px;
}

.quote-hero__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.quote-hero__breadcrumbs a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color .2s;
}

.quote-hero__breadcrumbs a:hover {
    color: #fff;
}

.quote-hero__breadcrumbs .sep {
    color: rgba(255, 255, 255, 0.4);
}

.quote-hero__title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin: 0;
}

/* ==========================================================
   Main white card
========================================================== */
.quote-card {
    background: var(--white);
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.quote-card__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 32px;
    line-height: 1.2;
}
.quote-page__layout { 
    padding: 64px; 
    background: #FFFFFF;
    box-shadow: 0px 12px 60px rgba(0, 0, 0, 0.03), 0px 4.62222px 19.1111px rgba(0, 0, 0, 0.0303704), 0px 0.977778px 4.88889px rgba(0, 0, 0, 0.0196296);
    border-radius: 24px; 
    margin: 100px 0;
}

/* ==========================================================
   Items list
========================================================== */
.quote-items {
    list-style: none;
    margin: 0 0 48px;
    padding: 0; 
}

.quote-item {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    transition: opacity .25s ease;
}

.quote-item.is-removing {
    opacity: 0;
    transform: translateX(-10px);
}

/* Thumb */
.quote-item__thumb {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--light-bg);
    overflow: hidden;
    flex-shrink: 0;
    padding: 8px;
    box-sizing: border-box;
}

.quote-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Title */
.quote-item__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .2s;
}

.quote-item__title:hover {
    color: var(--theme-green);
}

/* Qty control */
.quote-item__qty {
    display: inline-flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 10px;
    padding: 4px;
    gap: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.qty-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.qty-input {
    width: 40px;
    height: 32px;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: 2px solid var(--theme-green);
    outline-offset: 1px;
    border-radius: 6px;
}

/* Remove */
.quote-item__remove {
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--light-bg);
    border-radius: 10px;
    color: #6b6b6b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.quote-item__remove:hover {
    background: #fde8e8;
    color: #c0392b;
}

/* ==========================================================
   Form
========================================================== */
.quote-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    margin-bottom: 32px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field--honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-field label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 16px 18px;
    background: var(--light-bg);
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-color);
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #9b9b9b;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 0;
    border-color: var(--theme-green);
    background: #fff;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field.has-error input,
.form-field.has-error textarea {
    border-color: #c0392b;
    background: #fff5f5;
}

/* Submit button (extends .btn-quote) */
.quote-form__submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border: 0;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.quote-form__submit:hover {
    background: #429129;
}

.quote-form__submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.quote-form__submit .btn-icon {
    flex-shrink: 0;
}

.quote-form__submit.is-loading .btn-text,
.quote-form__submit.is-loading .btn-icon {
    visibility: hidden;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: qf-spin .7s linear infinite;
}

.quote-form__submit.is-loading .btn-loader {
    opacity: 1;
}

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

.quote-form__error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #ffcfcf;
    border-radius: 10px;
    color: #c0392b;
    font-size: 14px;
    display: none;
}

.quote-form__error.is-visible {
    display: block;
}

/* ==========================================================
   Empty state
========================================================== */
.quote-empty {
    text-align: center;
    padding: 80px 48px;
}

.quote-empty__icon {
    color: #c8c8c8;
    margin-bottom: 24px;
}

.quote-empty__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px;
}

.quote-empty__text {
    font-size: 16px;
    color: #6b6b6b;
    margin: 0 0 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.quote-items__title {
	font-size: 36px;
}
/* ==========================================================
   Success state
========================================================== */
.quote-success {
    text-align: center;
    padding: 80px 48px;
}

.quote-success__icon {
    color: var(--theme-green);
    margin-bottom: 24px;
}

.quote-success__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px;
}

.quote-success__text {
    font-size: 16px;
    color: #6b6b6b;
    margin: 0 0 32px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ==========================================================
   Toast notification (used sitewide)
========================================================== */
.quote-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    padding: 14px 22px;
    background: #111112;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    max-width: 360px;
}

.quote-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-toast.is-success {
    background: var(--theme-green);
}

.quote-toast.is-error {
    background: #c0392b;
}

/* ==========================================================
   Button "is-added" state (for shop & single product buttons)
========================================================== */
.btn-add-quote.is-added,
.add-to-request-btn.is-added {
    background: #2e7d20 !important;
    color: #fff !important;
}
.quote-items__count {
	font-size: 20px;
	font-weight: 500;
	color: var(--theme-green);
}
/* ==========================================================
   Responsive
========================================================== */
@media (max-width: 768px) {
    .quote-items__title {
	font-size: 20px;
        display: flex;
    flex-direction: column;
}
.quote-items__count{
    font-size: 14px;
}
    .quote-hero {
        padding: 20px 0 28px;
        margin-bottom: 24px;
    }

    .quote-hero__title {
        font-size: 28px;
    }

    .quote-card {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .quote-card__title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .quote-item {
        grid-template-columns: 80px 1fr auto;
        grid-template-areas: "thumb title remove" "thumb qty   qty";
        gap: 16px 20px;
        padding: 16px 0;
    }

    .quote-item__thumb {
        grid-area: thumb;
        width: 56px;
        height: 56px;
    }

    .quote-item__title {
        grid-area: title;
        font-size: 14px;
    }

    .quote-item__qty {
        grid-area: qty;
        justify-self: start;
    }

    .quote-item__remove {
        grid-area: remove;
        align-self: start;
    }

    .quote-form__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .quote-form__submit {
        width: 100%;
        justify-content: center;
    }

    .quote-empty,
    .quote-success {
        padding: 48px 20px;
    }
}
/* ===========================
   Quote Success Modal
=========================== */
.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quote-modal[hidden] {
    display: none;
}

.quote-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.quote-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.quote-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quote-modal.is-open .quote-modal__dialog {
    transform: translateY(0) scale(1);
}

.quote-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #94A3B8;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quote-modal__close:hover {
    background: #F1F5F9;
    color: #1A1A1A;
}

.quote-modal__icon {
    margin: 0 auto 24px;
    display: inline-flex;
    animation: modalIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes modalIconPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Animated checkmark */
.quote-modal__check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: modalCheckDraw 0.5s ease-out 0.4s forwards;
}

@keyframes modalCheckDraw {
    to { stroke-dashoffset: 0; }
}

.quote-modal__title {
    font-size: 26px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 12px;
    line-height: 1.2;
}

.quote-modal__text {
    font-size: 15px;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 28px;
}

.quote-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quote-modal__actions .btn-green,
.quote-modal__actions .btn-outline {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: #1A1A1A;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

/* Body lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Mobile */
@media (max-width: 480px) {
    .quote-modal__dialog {
        padding: 40px 24px 28px;
    }
    .quote-modal__title {
        font-size: 22px;
    }
    .quote-modal__actions {
        flex-direction: column;
    }
}
/* ===========================
   Quote Toast (улучшенный)
=========================== */
.quote-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    padding: 14px 20px 14px 48px;
    background: #1A1A1A;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-width: 360px;
    pointer-events: none;
}

.quote-toast::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.quote-toast.is-success {
    background: #16A34A;
}

.quote-toast.is-success::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>");
}

.quote-toast.is-error {
    background: #DC2626;
}

.quote-toast.is-error::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>");
}

.quote-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
@media (max-width: 768px) {
.quote-page__layout{
    padding: 20px;
    border-radius: 14px;
  margin: 40px 0;
}
}
@media (max-width: 480px) {
    .quote-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}