/**
 * Pontoon Calculator Styles
 * Калькулятор причала — морская тема
 */

/* === КОНТЕЙНЕР === */
.pontoon-calculator {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === HERO === */
.pontoon-hero {
    background: #fff;
    border: 2px solid #1565c0;
    border-radius: 16px;
    padding: 40px 20px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.pontoon-hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.pontoon-hero p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.pontoon-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 15px;
}

/* === ИНДИКАТОР ШАГОВ === */
.pontoon-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pontoon-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 25px;
    color: #9e9e9e;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pontoon-step-indicator .step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.pontoon-step-indicator.active {
    background: #e3f2fd;
    color: #1565c0;
}

.pontoon-step-indicator.active .step-number {
    background: #1565c0;
    color: white;
}

.pontoon-step-indicator.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.pontoon-step-indicator.completed .step-number {
    background: #4caf50;
    color: white;
}

/* === ШАГИ === */
.pontoon-step {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}

.pontoon-step.active {
    display: block;
}

.pontoon-step h2 {
    color: #1565c0;
    font-size: 20px;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e3f2fd;
}


/* === ТИПЫ ПРИЧАЛА === */
.pontoon-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pontoon-type-option {
    position: relative;
}

.pontoon-type-option input {
    position: absolute;
    opacity: 0;
}

.pontoon-type-option label {
    display: block;
    padding: 20px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.pontoon-type-option input:checked + label {
    background: #e3f2fd;
    border-color: #1565c0;
}

.pontoon-type-option label:hover {
    background: #e8e8e8;
}

.type-icon {
    font-size: 36px;
    font-weight: bold;
    color: #1565c0;
    display: block;
    margin-bottom: 10px;
}

.type-name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.type-desc {
    display: block;
    font-size: 12px;
    color: #757575;
}

/* === ТИПЫ БЕРЕГА === */
.pontoon-shores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.pontoon-shore-option {
    position: relative;
}

.pontoon-shore-option input {
    position: absolute;
    opacity: 0;
}

.pontoon-shore-option label {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pontoon-shore-option input:checked + label {
    background: #e3f2fd;
    border-color: #1565c0;
}

.shore-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.shore-desc {
    display: block;
    font-size: 11px;
    color: #757575;
    margin-top: 3px;
}

/* === ФОРМА === */
.pontoon-form-group {
    margin-bottom: 20px;
}

.pontoon-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.pontoon-form-group input[type="number"],
.pontoon-form-group select {
    width: 100%;
    max-width: 200px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.pontoon-form-group input:focus {
    border-color: #1565c0;
    outline: none;
}

.pontoon-dimension-unit {
    display: inline-block;
    margin-left: 10px;
    color: #757575;
    font-size: 14px;
}

.pontoon-hint {
    font-size: 12px;
    color: #9e9e9e;
    margin-top: 5px;
}

.pontoon-dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* === ПРЕВЬЮ РАСКЛАДКИ === */
.pontoon-layout-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.preview-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #1565c0;
}

.preview-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.preview-grid-wrap::-webkit-scrollbar {
    height: 6px;
}

.preview-grid-wrap::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 3px;
}

.preview-grid-wrap::-webkit-scrollbar-thumb {
    background: #90caf9;
    border-radius: 3px;
}

.preview-scroll-hint {
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 8px;
    display: none;
}

.preview-scroll-hint.visible {
    display: block;
}

.preview-grid {
    display: inline-grid;
    gap: 3px;
    background: #1565c0;
    padding: 3px;
    border-radius: 5px;
}

.preview-module {
    width: 40px;
    height: 20px;
    background: #64b5f6;
    border-radius: 2px;
}

.preview-info {
    font-size: 14px;
    color: #546e7a;
}

.preview-info strong {
    color: #1565c0;
}

/* === ЧЕКБОКСЫ КОМПЛЕКТУЮЩИХ === */
.pontoon-accessories {
    margin-bottom: 25px;
}

.pontoon-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.pontoon-checkbox-group:hover {
    background: #e8e8e8;
}

.pontoon-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.pontoon-checkbox-group label {
    flex: 1;
    cursor: pointer;
}

.checkbox-title {
    display: block;
    font-weight: 600;
}

.checkbox-price {
    display: inline-block;
    background: #1565c0;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

.checkbox-desc {
    display: block;
    font-size: 12px;
    color: #757575;
    margin-top: 3px;
}

/* === НАВИГАЦИЯ === */
.pontoon-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pontoon-step-btn {
    padding: 12px 25px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pontoon-step-btn:hover {
    background: #e0e0e0;
}

.pontoon-step-btn.primary {
    background: #1565c0;
    color: white;
}

.pontoon-step-btn.primary:hover {
    background: #0d47a1;
}

/* === РЕЗУЛЬТАТЫ === */
.pontoon-results-section {
    margin-bottom: 25px;
}

.pontoon-results-section h3 {
    font-size: 16px;
    color: #1565c0;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e3f2fd;
}

.pontoon-result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pontoon-result-row:last-child {
    border-bottom: none;
}

.result-label {
    color: #546e7a;
}

.result-value {
    font-weight: 600;
}

.result-qty {
    color: #757575;
    font-size: 14px;
}

.result-price {
    color: #1565c0;
}

/* Итого */
.pontoon-total {
    background: #fff;
    border: 2px solid #1565c0;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.pontoon-total-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.pontoon-total-value {
    font-size: 36px;
    font-weight: 700;
    color: #1565c0;
}

.pontoon-total-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Предупреждение */
.pontoon-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}


/* === ИНФО БЛОК === */
.pontoon-info-block {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.pontoon-info-block h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.pontoon-info-block ul {
    margin: 0;
    padding-left: 20px;
}

.pontoon-info-block li {
    margin-bottom: 8px;
    color: #546e7a;
}

.pontoon-info-block p {
    margin: 15px 0 0;
    color: #757575;
    font-size: 14px;
}

/* === ОШИБКИ === */
#pontoon_errors {
    background: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

#pontoon_errors.visible {
    display: block;
}

#pontoon_errors ul {
    margin: 0;
    padding-left: 20px;
    color: #c62828;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .pontoon-hero h1 {
        font-size: 22px;
    }

    .pontoon-steps-indicator {
        gap: 5px;
    }

    .pontoon-step-indicator {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pontoon-step-indicator .step-label {
        display: none;
    }

    .pontoon-types {
        grid-template-columns: 1fr;
    }

    .pontoon-shores {
        grid-template-columns: 1fr;
    }

    .pontoon-dimensions {
        grid-template-columns: 1fr;
    }

    .pontoon-step-nav {
        flex-direction: column;
        gap: 10px;
    }

    .pontoon-step-btn {
        width: 100%;
        justify-content: center;
    }
}
