/* ================================================================= */
/*  Carts & Quotes – Modal & Button Styles                            */
/* ================================================================= */

/* ── Quote Button (in cart actions row) ───────────────────────────── */
.gmc-quote-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 10px 22px !important;
    background: var(--gmc-btn-bg, #212121) !important;
    color: var(--gmc-btn-color, #fff) !important;
    border: none !important;
    border-radius: var(--gmc-btn-radius, 6px) !important;
    font-size: 14px !important;
    vertical-align: bottom;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
    line-height: 1.4 !important;
}

.gmc-quote-btn:active {
    transform: translateY(0);
}

.gmc-quote-btn svg {
    flex-shrink: 0;
}

/* ── Overlay ─────────────────────────────────────────────────────── */
.gmc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Modal ────────────────────────────────────────────────────────── */
.gmc-modal {
    position: relative;
    background: var(--gmc-modal-bg, #fff);
    border-radius: var(--gmc-modal-radius, 14px);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 32px 28px;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: gmc-slide-up 0.25s ease-out;
}

@keyframes gmc-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Close button ─────────────────────────────────────────────────── */
.gmc-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.gmc-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ── Header ───────────────────────────────────────────────────────── */
.gmc-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.gmc-modal-header svg {
    color: #3b82f6;
    margin-bottom: 10px;
}

.gmc-modal-header h2 {
    margin: 0 0 6px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--gmc-modal-color, #0f172a) !important;
    letter-spacing: -0.01em;
    line-height: 1.3 !important;
}

.gmc-subtitle {
    margin: 0 !important;
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}

/* ── Form fields ──────────────────────────────────────────────────── */
#gmc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gmc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gmc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gmc-field label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.gmc-req {
    color: #ef4444;
}

.gmc-field input,
.gmc-field textarea {
    border-style: solid;
    border-width: 1px;
    box-shadow: none;
    color: currentcolor;
    font-size: inherit;
    line-height: 40px;
    outline: none;
    padding: 0 12px;
    transition: var(--bricks-transition);
    width: 100%;
    border-color: #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-family: inherit;
    box-sizing: border-box;
}

.gmc-modal button,
.gmc-modal input,
.gmc-modal optgroup,
.gmc-modal select,
.gmc-modal textarea {
    font-family: inherit;
    text-align: inherit;
}

.gmc-field input::placeholder,
.gmc-field textarea::placeholder {
    color: #94a3b8;
}

.gmc-field input:focus,
.gmc-field textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
}

.gmc-field textarea {
    resize: vertical;
    min-height: 64px;
    line-height: 1.5;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* ── Action buttons ───────────────────────────────────────────────── */
.gmc-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.gmc-btn-secondary {
    padding: 11px 20px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.gmc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.gmc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    background: var(--gmc-submit-bg, #7db939);
    color: var(--gmc-submit-color, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    min-width: 180px;
    justify-content: center;
}

.gmc-btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
}

.gmc-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gmc-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gmc-btn-text svg {
    flex-shrink: 0;
}

/* ── Spinner ──────────────────────────────────────────────────────── */
.gmc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gmc-spin 0.65s linear infinite;
}

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

/* ── Error ────────────────────────────────────────────────────────── */
.gmc-error {
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .gmc-modal {
        padding: 28px 20px 22px;
        border-radius: 12px;
        max-height: 95vh;
    }

    .gmc-field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gmc-actions {
        flex-direction: column-reverse;
    }

    .gmc-actions button {
        width: 100%;
    }
}
