/* === ПОДКЛЮЧЕНИЕ ШРИФТА INTER === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === ОСНОВНОЙ КОНТЕЙНЕР === */
.fp-app {
    max-width: 970px;
    margin: 0 auto 30px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #ffffff;
    padding: 30px;
    color: #374151;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    line-height: 1.6;
}

/* === ЗАГОЛОВКИ (ШАГИ 1, 2, 3) === */
.fp-title {
    font-family: 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #E64A19;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
}
.fp-title::before { 
    content: ''; 
    display: inline-block; 
    width: 6px; 
    height: 24px;
    background: #E64A19; 
    border-radius: 2px;
    margin-right: 12px; 
}

/* === ЛЕНТА ТИПОВ (ШАГ 1) === */
.fp-type-grid { 
    display: flex; 
    gap: 12px; 
    margin-bottom: 30px; 
    overflow-x: auto; 
    padding-bottom: 10px; /* Чуть больше места для движения вниз */
    padding-top: 5px;
}
.fp-tile {
    flex: 1; 
    min-width: 100px; 
    background: #f9fafb;
    border: 1px solid #e5e7eb; 
    border-radius: 6px;
    padding: 15px 5px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 90px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Легкая тень по умолчанию */
}

/* ЭФФЕКТ НАВЕДЕНИЯ - ВНИЗ */
.fp-tile:hover { 
    border-color: #E64A19; 
    background: #fff; 
    transform: translateY(4px); /* Движение ВНИЗ */
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Тень уменьшается при нажатии */
    color: #E64A19;
}

.fp-tile.active { 
    background: #E64A19;
    border-color: #E64A19;
    color: #fff; 
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2); /* Внутренняя тень для активного */
    transform: translateY(4px); /* Активный тоже "нажат" */
}

.fp-tile-icon { 
    font-size: 28px; 
    margin-bottom: 8px; 
    color: #9ca3af;
    line-height: 1; 
    transition: color 0.2s;
}
.fp-tile:hover .fp-tile-icon { color: #E64A19; }
.fp-tile.active .fp-tile-icon { color: #fff; }

.fp-tile span:last-child { 
    font-family: 'Inter', sans-serif; 
    font-size: 12px; 
    font-weight: 600; 
    line-height: 1.2; 
}

/* === ВЫБОР СТАНДАРТА (ШАГ 2) === */
.fp-label-head { 
    font-family: 'Inter', sans-serif;
    font-weight: 600; 
    font-size: 14px; 
    margin-bottom: 12px; 
    display: block; 
    color: #4b5563;
}
.fp-std-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.fp-std-tile { 
    padding: 8px 16px; 
    background: #fff; 
    border: 1px solid #d1d5db; 
    border-radius: 4px; 
    font-size: 14px; 
    cursor: pointer; 
    color: #4b5563; 
    transition: all 0.2s; 
    font-weight: 500;
}
.fp-std-tile:hover { border-color: #E64A19; color: #E64A19; }
.fp-std-tile.active { 
    background: #374151;
    color: #fff; 
    border-color: #374151;
}

/* === РАБОЧАЯ ОБЛАСТЬ === */
.fp-work-area {
    display: flex; 
    gap: 30px; 
    align-items: flex-start;
    min-height: 400px;
}

/* ЛЕВАЯ КОЛОНКА */
.fp-col-input {
    flex: 0 0 50%; 
    min-width: 300px;
    display: flex; 
    flex-direction: column;
}

/* ПРАВАЯ КОЛОНКА */
.fp-col-result {
    flex: 1;
    display: flex; 
    flex-direction: column; 
    gap: 20px;
}

/* === СПИСКИ (SELECT) === */
.fp-list-select { 
    width: 100%; 
    height: 400px; 
    border: 1px solid #d1d5db; 
    border-radius: 4px; 
    padding: 10px; 
    font-size: 14px; 
    background-color: #ffffff !important;
    color: #374151 !important;
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

.fp-list-select:focus {
    border-color: #E64A19 !important;
    box-shadow: 0 0 0 1px #E64A19;
}

.fp-list-select optgroup { 
    font-family: 'Inter', sans-serif;
    font-weight: 700; 
    background-color: #f3f4f6 !important; 
    color: #111827 !important;
    font-style: normal;
    font-size: 13px; 
    padding: 8px 5px;
}

.fp-list-select option { 
    padding: 8px 10px; 
    border-bottom: 1px solid #f9fafb; 
    color: #374151 !important;
    background-color: #ffffff !important;
}

.fp-list-select option:checked,
.fp-list-select option:hover,
.fp-list-select option:focus {
    background-color: #E64A19 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; 
    text-fill-color: #ffffff !important;
    box-shadow: 0 0 10px 100px #E64A19 inset !important;
}

/* КАСКАДНЫЕ СПИСКИ */
.fp-cascading-wrap {
    display: flex; 
    gap: 12px; 
    height: 400px; 
}

.fp-list-col {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

.fp-col-header {
    font-family: 'Inter', sans-serif;
    background: #f3f4f6;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
    color: #4b5563;
}

.fp-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.fp-list-item {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background 0.1s;
}
.fp-list-item:hover { background: #fff1ed; color: #E64A19; }
.fp-list-item.active { 
    background: #E64A19;
    color: #fff; 
}

/* === ВИЗУАЛИЗАЦИЯ === */
.fp-col-visual {
    background: #fff; 
    border: 1px solid #e5e7eb; 
    border-radius: 6px;
    position: relative; 
    padding: 15px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
    overflow: hidden;
    height: 250px;
}
.fp-visual-header { 
    font-family: 'Inter', sans-serif; 
    top: 10px; 
    font-size: 11px; 
    font-weight: 500; 
    color: #9ca3af; 
    width: 100%; 
    text-align: center; 
    position: absolute; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    pointer-events: none; 
}

/* === ХАРАКТЕРИСТИКИ === */
.fp-stat-card {
    background: #f9fafb; 
    border: 1px solid #e5e7eb; 
    border-radius: 6px;
    padding: 20px; 
    box-sizing: border-box;
}
.fp-stat-card h4 { 
    font-family: 'Inter', sans-serif;
    font-size: 14px; 
    margin: 0 0 15px 0; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 10px; 
    text-transform: uppercase; 
    color: #1f2937;
    font-weight: 600; 
}
.fp-stat-rows { display: flex; flex-direction: column; gap: 10px; }
.fp-stat-row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dotted #d1d5db; padding-bottom: 5px; }
.fp-stat-label { color: #6b7280; font-size: 13px; font-weight: 500; line-height: 1.3; margin-right: 10px; }
.fp-stat-val { font-family: 'Inter', sans-serif; font-weight: 600; color: #111827; font-size: 15px; white-space: nowrap; }
.fp-stat-val small { font-size: 12px; color: #9ca3af; margin-left: 2px; font-weight: 400; }
.fp-divider { margin: 10px 0; background: #e5e7eb; height: 1px; }

/* === INPUTS === */
.fp-inp-wrap { margin-bottom: 15px; } 
.fp-inp-wrap label { 
    font-family: 'Inter', sans-serif;
    font-size: 13px; 
    margin-bottom: 6px; 
    font-weight: 500; 
    display:block; 
    color: #4b5563;
}
.fp-input { padding: 10px 12px; font-size: 15px; height: 42px; width: 100%; box-sizing: border-box; border-radius: 4px; border:1px solid #d1d5db; transition: border 0.2s; color: #1f2937; }
.fp-input:focus { border-color: #E64A19; outline: none; }

/* === SVG СТИЛИ === */
svg#profileSvg { width: 100%; height: 100%; }
.profile-body { fill: #e5e7eb; stroke: #4b5563; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }

.side-coating { 
    stroke: #E64A19; 
    stroke-width: 3px; 
    fill: none; 
    stroke-linecap: round; 
    pointer-events: none; 
    transition: opacity 0.2s; 
    vector-effect: non-scaling-stroke; 
    stroke-opacity: 1;
}

.side-click-area { 
    stroke: transparent; 
    stroke-width: 22px; 
    fill: none; 
    cursor: pointer; 
    vector-effect: non-scaling-stroke; 
}
.side-click-area:hover { stroke: rgba(230, 74, 25, 0.15); }

.wall-hatch { fill: url(#wallHatch); opacity: 0; pointer-events: none; } 
.wall-hatch.visible { opacity: 1; }

.dim-text { 
    font-size: 16px; 
    fill: #111827; 
    font-weight: 600; 
    text-anchor: middle; 
    font-family: 'Inter', sans-serif; 
    pointer-events: none; 
    text-shadow: -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 2px 2px 0 #fff; 
}
.dim-line { stroke: #374151; stroke-width: 1px; vector-effect: non-scaling-stroke; pointer-events: none; }

/* === ТАБЫ И ТАБЛИЦА === */
#fpStep3 { /* Управляется скриптом, но по умолчанию виден */ }

.fp-tabs-header { 
    display: flex; 
    flex-wrap: wrap; 
    border-bottom: 2px solid #e5e7eb; 
    background: #f9fafb; 
    border-radius: 6px 6px 0 0;
}
.fp-tab-btn { 
    font-family: 'Inter', sans-serif;
    padding: 14px 24px; 
    background: transparent; 
    border: none; 
    border-right: 1px solid #e5e7eb; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 600; 
    color: #6b7280; 
    flex-grow: 1; 
    transition: all 0.2s;
}
.fp-tab-btn:hover { background: #f3f4f6; color: #E64A19; }
.fp-tab-btn:first-child { border-radius: 6px 0 0 0; }
.fp-tab-btn:last-child { border-right: none; border-radius: 0 6px 0 0; }

.fp-tab-btn.active { 
    background: #E64A19; 
    color: #fff; 
}

.fp-tabs-content { border: 1px solid #e5e7eb; border-top: none; background: #fff; padding: 0; overflow-x: auto; border-radius: 0 0 6px 6px; }
.fp-tab-pane { display: none; padding: 0; } .fp-tab-pane.active { display: block; }

/* ТАБЛИЦА */
.fp-paint-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fp-paint-table th { 
    font-family: 'Inter', sans-serif;
    background: #f3f4f6; 
    padding: 15px; 
    text-align: center; 
    border-bottom: 2px solid #e5e7eb; 
    color: #4b5563; 
    font-weight: 600; 
    vertical-align: middle; 
    font-size: 12px;
}
.fp-paint-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #f3f4f6; 
    color: #374151; 
    text-align: center; 
    vertical-align: middle; 
}
.fp-paint-table tr:last-child td { border-bottom: none; }
.fp-paint-table tr:hover td { background: #fff7ed; }

.fp-paint-table strong { color: #111827; font-weight: 600; }

.fp-val-green {
    color: #d94516 !important; 
    font-weight: 700;
}

.fp-cell-center { 
    vertical-align: middle !important; 
    background: #fff; 
    border-right: 1px solid #f3f4f6; 
    font-weight: 600; 
}

.fp-cell-wrap {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
}

.fp-small-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
    margin-right: 15px;
}

.fp-value {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-left: auto;
}

@media (max-width: 900px) {
    .fp-work-area { flex-direction: column; }
    .fp-col-input, .fp-col-result { flex: none; width: 100%; }
    .fp-cascading-wrap, .fp-list-select { height: 350px; }
    .fp-tab-btn { flex-basis: 50%; border-bottom: 1px solid #e5e7eb; } 
    .fp-tab-btn:first-child { border-radius: 0; }
    .fp-tab-btn:last-child { border-radius: 0; }
}