/*
 * wycena-modal.css  (P1-4, 2026-06-21)
 * Wyekstrahowane reguly modala 'Zapytanie o wycene' (#wycenaModal/.wycena-*) z narzedzia.css.
 * modal.php jest includowany globalnie, wiec ten maly plik laduje sie na kazdej stronie,
 * a pelny narzedzia.css (56KB narzedzi druku) tylko na stronach narz_*/agencja/portfolio.
 * Zrodlo prawdy reguly wycena pozostaje w narzedzia.css (tu jest wyekstrahowana kopia).
 */

/* Wycena modal */
#wycenaModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

#wycenaModal .modal-header {
    border-bottom: none;
    padding: 2rem 2rem 0.5rem;
}

#wycenaModal .modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: #1a1a2e;
}

#wycenaModal .wycena-subtitle {
    font-size: 0.9rem;
}

#wycenaModal .modal-body {
    padding: 1rem 2rem 2rem;
}

#wycenaModal .wycena-consent-label {
    font-size: 0.85rem;
}

#wycenaModal .wycena-consent-check {
    border: 2px solid #6b7280;
}

#wycenaModal .wycena-submit-btn {
    background: linear-gradient(135deg, #304068 0%, #5a6c8e 100%);
    color: white;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: opacity 0.2s;
}

#wycenaModal .wycena-success {
    padding: 2rem 0;
}

#wycenaModal .wycena-success-icon {
    font-size: 4rem;
    color: #304068;
}

#wycenaModal .wycena-success h5 {
    font-weight: 600;
}

/* Wycena modal - service chips */
.wycena-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.wycena-chip {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    background: #fff;
    flex: 0 0 calc(50% - 5px);
    box-sizing: border-box;
}

.wycena-chip:hover {
    border-color: #8a9bb8;
    background: #f4f6fa;
}

.wycena-chip.selected {
    border-color: #304068;
    background: #eef0f5;
    color: #304068;
    font-weight: 600;
}

.wycena-chip .chip-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.wycena-chip .chip-text {
    line-height: 1.3;
}

.wycena-chip .chip-label {
    display: block;
    font-weight: 500;
}

.wycena-chip .chip-desc {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: #94a3b8;
}

.wycena-chip.selected .chip-desc {
    color: #5a6c8e;
}

.wycena-chip.wycena-chip-full {
    flex: 0 0 100%;
}

/* Wycena modal - product selector */
.wycena-product-selector {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(139, 92, 246, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.wycena-product-selector .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 8px;
}

.wycena-product-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.wycena-product-dropdown {
    flex: 1;
    border: 2px solid #304068;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #1e293b;
}

.wycena-product-dropdown:focus {
    border-color: #304068;
    box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-add-product-btn {
    background: #304068;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wycena-add-product-btn:hover {
    background: #304068;
    color: #fff;
}

.wycena-add-product-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.wycena-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wycena-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    animation: wycenaItemIn 0.2s ease-out;
}

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

.wycena-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wycena-custom-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #304068;
}

.wycena-custom-fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wycena-field-grow {
    flex: 1;
    min-width: 120px;
}

.wycena-custom-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.wycena-custom-input::placeholder {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.wycena-custom-input:focus {
    border-color: #304068;
    box-shadow: 0 0 0 2px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-item-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e293b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wycena-item-fields {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wycena-field-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wycena-field-label {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

.wycena-size-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

.wycena-size-input::placeholder {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.wycena-size-input:focus {
    border-color: #304068;
    box-shadow: 0 0 0 2px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-size-select {
    width: auto;
    max-width: 200px;
    padding: 4px 28px 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1e293b;
    background-color: #fff;
}

.wycena-size-select:focus {
    border-color: #304068;
    box-shadow: 0 0 0 2px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-unit-select {
    width: auto;
    padding: 4px 24px 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1e293b;
    background-color: #fff;
}

.wycena-unit-select:focus {
    border-color: #304068;
    box-shadow: 0 0 0 2px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-qty-input {
    width: 65px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.wycena-qty-input:focus {
    border-color: #304068;
    box-shadow: 0 0 0 2px rgba(124, 92, 191, 0.15);
    outline: none;
}

.wycena-item-unit {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 28px;
}

.wycena-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.wycena-item-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}
