/* ============================================================
   Koleksiyon Teklif & Konfigürasyon Modal Stilleri (Kural 1 & 2 Uyumlu)
   Sıfır inline CSS, Birebir board.moonon.uk tasarımı
   ============================================================ */

.cp-quote-modal {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 72px rgba(13, 27, 62, 0.32);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0d1b3e;
    overflow: hidden;
}

.cp-quote-modal[open] {
    position: fixed;
    inset: 0;
    margin: auto;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    animation: cpQuotePop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.cp-quote-modal::backdrop {
    background: rgba(13, 27, 62, 0.58);
    backdrop-filter: blur(4px);
}

@keyframes cpQuotePop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cp-quote-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #edf0f5;
}

.cp-quote-title {
    font-size: 19px;
    font-weight: 700;
    color: #172b4d;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.cp-quote-sub {
    font-size: 13.5px;
    color: #5e6c84;
    margin: 0;
    line-height: 1.45;
}

.cp-quote-close {
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: #6b778c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.cp-quote-close:hover {
    background: #f4f5f7;
    color: #172b4d;
}

.cp-quote-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Marka Kartı */
.cp-quote-brand-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cp-quote-brand-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 20px;
}

.cp-quote-brand-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cp-quote-brand-logo-box {
    width: 68px;
    height: 68px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    flex-shrink: 0;
}

.cp-quote-brand-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cp-quote-brand-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp-quote-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #172b4d;
    margin: 0;
}

.cp-quote-brand-phone {
    font-size: 13px;
    color: #42526e;
    font-weight: 500;
}

.cp-quote-brand-address {
    font-size: 12px;
    color: #6b778c;
    line-height: 1.4;
}

.cp-quote-brand-note {
    width: 100%;
    height: 72px;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #172b4d;
    resize: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cp-quote-brand-note:focus {
    outline: none;
    border-color: #0052cc;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
}

/* Ürün Satırı */
.cp-quote-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cp-quote-line-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s;
}

.cp-quote-line-item:hover {
    border-color: #cbd5e1;
}

.cp-quote-line-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cp-quote-line-prod {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-quote-line-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #edf0f5;
    background: #ffffff;
    object-fit: cover;
    flex-shrink: 0;
}

.cp-quote-line-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #172b4d;
}

.cp-quote-line-qty-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5e6c84;
}

.cp-quote-line-qty-input {
    width: 54px;
    height: 32px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #172b4d;
    background: #ffffff;
}

/* Konfigürasyon Açıklaması ve Seçici Kutusu */
.cp-quote-line-config-text {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.45;
    background: #ffffff;
    font-family: inherit;
    resize: vertical;
}

.cp-quote-line-config-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.cp-quote-config-picker-btn {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
}

.cp-quote-config-picker-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Konfigürasyon Detay Seçici Çekmecesi */
.cp-quote-config-drawer {
    border-top: 1px dashed #cbd5e1;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cp-quote-config-drawer[hidden] {
    display: none;
}

.cp-quote-cfg-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp-quote-cfg-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cp-quote-cfg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cp-quote-cfg-option {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.cp-quote-cfg-option:hover {
    border-color: #0052cc;
    background: #f8fafc;
}

.cp-quote-cfg-option.is-selected {
    border-color: #0052cc;
    background: #ebf5ff;
    color: #0052cc;
    font-weight: 600;
}

.cp-quote-cfg-thumb {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
}

/* Alt Aksiyon Butonları */
.cp-quote-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid #edf0f5;
    background: #ffffff;
}

.cp-quote-btn-reset {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.cp-quote-btn-reset:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.cp-quote-btn-submit {
    background: #0052cc;
    color: #ffffff;
    border: 1px solid #0052cc;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.cp-quote-btn-submit:hover {
    background: #0747a6;
    border-color: #0747a6;
}

.cp-quote-btn-submit:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .cp-quote-brand-top {
        grid-template-columns: 1fr;
    }
    .cp-quote-line-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
