/* ============================================
   POPTÁVKOVÝ FORMULÁŘ - KOMPLETNÍ CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Základní wrapper */
.popt-wrapper {
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Hlavní kontejner */
.popt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   INFO HERO SEKCE - OPRAVENO BEZ NEZÁVAZNÁ
   ============================================ */
.popt-info-hero {
    position: relative;
    min-height: 380px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    margin-bottom: 0;
}

/* Tmavé pozadí */
.popt-info-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #171717 0%, #1a1a1a 100%);
    opacity: 0.95;
}

/* Gradient overlay efekt */
.popt-info-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 107, 0, 0.05) 0%, transparent 50%);
}

.popt-info-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
    max-width: 900px;
    width: 100%;
}

/* HLAVNÍ NADPIS - BEZ NEZÁVAZNÁ, NA JEDNOM ŘÁDKU */
.popt-info-main-title {
    font-size: 56px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.8);
    white-space: nowrap;
}

/* Oranžový span pro zvýraznění */
.popt-info-main-title span {
    color: #FF6B00;
}

/* ODSTRANĚNO ::before s "NEZÁVAZNÁ" */

.popt-info-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
    font-weight: 500;
}

/* Kontakt box */
.popt-info-contact {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 18px 30px;
    border-radius: 14px;
    display: inline-block;
}

.popt-info-contact span {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-right: 10px;
}

.popt-info-email {
    color: #FF6B00;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.popt-info-email:hover {
    color: #ff8533;
    text-decoration: underline;
}

/* ============================================
   MINI PROGRESS BAR
   ============================================ */
.popt-mini-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.popt-mini-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.popt-mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B00, #ff8533);
    border-radius: 4px;
    transition: width 0.5s ease-out;
    width: 0%;
}

.popt-mini-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

/* ============================================
   KROKY
   ============================================ */
.popt-step {
    display: none;
}

.popt-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KONZISTENTNÍ NADPISY KROKŮ */
.popt-step-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
}

.popt-step-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
    text-align: center;
}

/* ============================================
   VÝBĚR TYPU - GRID LAYOUT
   ============================================ */
.popt-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.popt-type-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 20px;
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.popt-type-card:hover {
    border-color: #FF6B00;
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 107, 0, 0.15);
}

.popt-type-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fff5f0, #ffe8dd);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.popt-type-icon svg {
    width: 35px;
    height: 35px;
    stroke: #FF6B00;
}

.popt-type-card h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.popt-type-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   SEKCE PRODUKTŮ
   ============================================ */
.popt-all-sections {
    margin-bottom: 30px;
}

.popt-product-section {
    margin-bottom: 40px;
}

.popt-section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.popt-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   FORMULÁŘOVÉ POLOŽKY
   ============================================ */
.popt-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    position: relative;
}

.popt-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.popt-item-number {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.popt-item-remove {
    width: 34px;
    height: 34px;
    border: none;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popt-item-remove:hover {
    background: #cc0000;
    transform: rotate(90deg) scale(1.1);
}

/* Tlačítka pod položkou */
.popt-item-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   FORMULÁŘOVÁ POLE
   ============================================ */
.popt-form-group {
    margin-bottom: 22px;
}

.popt-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.popt-label-required {
    color: #ff4444;
}

.popt-input,
.popt-select,
.popt-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    background: #fff;
}

.popt-input:hover,
.popt-select:hover,
.popt-textarea:hover {
    border-color: #b0b0b0;
}

.popt-input:focus,
.popt-select:focus,
.popt-textarea:focus {
    outline: none;
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.popt-input.error,
.popt-select.error,
.popt-textarea.error {
    border-color: #ff4444;
    background: #fff5f5;
}

.popt-textarea {
    min-height: 110px;
    resize: vertical;
}

.popt-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* Upozornění pro průměry trubek */
.popt-diameter-warning {
    display: none;
    align-items: center;
    gap: 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 15px;
    color: #856404;
    font-size: 14px;
}

.popt-diameter-warning svg {
    width: 20px;
    height: 20px;
    stroke: #ffc107;
    flex-shrink: 0;
}

/* ============================================
   TLAČÍTKA
   ============================================ */
.popt-btn-add {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.popt-btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.popt-btn-add svg {
    width: 20px;
    height: 20px;
}

/* Sekce pro přidání jiného typu */
.popt-add-other-section {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 28px;
    margin-top: 35px;
    text-align: center;
}

.popt-add-other-section p {
    font-size: 15px;
    color: #666;
    margin-bottom: 22px;
}

.popt-add-buttons-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.popt-btn-add-other {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 11px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.popt-btn-add-other:hover {
    border-color: #FF6B00;
    background: #fff5f0;
    color: #FF6B00;
}

.popt-btn-add-other svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   UPLOAD AREA
   ============================================ */
.popt-upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 14px;
    padding: 35px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.popt-upload-area:hover {
    border-color: #FF6B00;
    background: #fff5f0;
}

.popt-upload-area svg {
    width: 45px;
    height: 45px;
    stroke: #999;
    margin-bottom: 16px;
}

.popt-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.popt-upload-hint {
    font-size: 13px;
    color: #999;
}

.popt-files-list {
    margin-top: 16px;
}

.popt-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 8px;
}

.popt-file-name {
    font-size: 14px;
    color: #333;
}

.popt-file-remove {
    width: 26px;
    height: 26px;
    border: none;
    background: #ff4444;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.popt-file-remove:hover {
    background: #cc0000;
}

/* ============================================
   NAVIGACE
   ============================================ */
.popt-navigation {
    margin-top: 45px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.popt-navigation-back {
    margin-top: 30px;
    text-align: center;
}

.popt-btn {
    padding: 17px 36px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.popt-btn-next {
    background: linear-gradient(135deg, #FF6B00, #ff8533);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.popt-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.3);
}

.popt-btn-back {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.popt-btn-back:hover {
    border-color: #999;
    background: #f8f8f8;
}

.popt-btn-back svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   KROK 3 - FINÁLNÍ LAYOUT
   ============================================ */
.popt-final-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
}

.popt-final-left {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 32px;
}

.popt-final-right {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 32px;
    height: fit-content;
}

/* Volitelné údaje */
.popt-optional-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    margin: 28px 0 22px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.popt-optional-toggle:hover {
    background: #e8e8e8;
}

.popt-optional-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.popt-optional-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.popt-optional-fields.show {
    max-height: 1000px;
}

.popt-optional-toggle svg {
    transform: rotate(0deg);
}

.popt-optional-toggle.active svg {
    transform: rotate(180deg);
}

/* Desktop navigační tlačítka */
.popt-desktop-nav-buttons {
    margin-top: 30px;
    text-align: center;
}

.popt-btn-back-desktop {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 17px 36px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.popt-btn-back-desktop:hover {
    border-color: #999;
    background: #f8f8f8;
}

.popt-btn-back-desktop svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   SOUHRN
   ============================================ */
.popt-summary-content {
    margin-bottom: 28px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling */
.popt-summary-content::-webkit-scrollbar {
    width: 6px;
}

.popt-summary-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popt-summary-content::-webkit-scrollbar-thumb {
    background: #FF6B00;
    border-radius: 10px;
}

.popt-summary-content::-webkit-scrollbar-thumb:hover {
    background: #e55a00;
}

.popt-summary-item {
    background: #fff;
    border-radius: 11px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
}

.popt-summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.popt-summary-item-type {
    background: #FF6B00;
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.popt-summary-item-qty {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.popt-summary-item-details {
    font-size: 14px;
    color: #333;
}

.popt-summary-item-dims {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

/* GDPR consent checkbox — povinny pred odeslanim */
.popt-gdpr-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #fff7f1;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 12px;
    margin: 16px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #3d3a36;
    cursor: pointer;
}

.popt-gdpr-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #FF6B00;
    cursor: pointer;
}

.popt-gdpr-consent a {
    color: #FF6B00;
    font-weight: 600;
    text-decoration: underline;
}

.popt-gdpr-consent a:hover {
    color: #d95700;
}

/* Desktop tlačítko odeslat */
.popt-btn-submit-desktop {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.popt-btn-submit-desktop:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.popt-btn-submit-desktop svg {
    width: 20px;
    height: 20px;
}

/* Navigační tlačítka na mobilu */
.popt-mobile-nav-buttons {
    display: none;
    margin-top: 30px;
}

.popt-btn-back-mobile {
    width: 100%;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 36px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.popt-btn-back-mobile:hover {
    border-color: #999;
    background: #f8f8f8;
}

.popt-btn-back-mobile svg {
    width: 20px;
    height: 20px;
}

/* Mobilní tlačítko odeslat */
.popt-btn-submit-mobile {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.popt-btn-submit-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.popt-btn-submit-mobile svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.popt-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.popt-loading.active {
    display: flex;
}

.popt-loading-content {
    background: #fff;
    border-radius: 18px;
    padding: 45px;
    text-align: center;
}

.popt-loading-spinner {
    width: 55px;
    height: 55px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #FF6B00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 22px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.popt-loading-text {
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

/* ============================================
   CHYBOVÉ HLÁŠKY
   ============================================ */
.popt-error {
    background: #ffebee;
    color: #c62828;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 22px;
    border-left: 4px solid #c62828;
    display: none;
    font-weight: 500;
}

.popt-error.active {
    display: block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .popt-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Na tabletu může být menší písmo aby se vešlo */
    .popt-info-main-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .popt-container {
        padding: 20px 15px;
    }
    
    .popt-info-hero {
        padding: 40px 25px;
        min-height: 320px;
    }
    
    /* NA MOBILU MŮŽE BÝT NA VÍCE ŘÁDKŮ */
    .popt-info-main-title {
        font-size: 26px;
        letter-spacing: 1px;
        margin-bottom: 15px;
        white-space: normal;
        line-height: 1.2;
    }
    
    .popt-info-subtitle {
        font-size: 14px;
    }
    
    .popt-step-title {
        font-size: 28px;
    }
    
    .popt-type-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .popt-type-card {
        padding: 25px 20px;
    }
    
    .popt-final-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .popt-final-right {
        order: 1;
        margin-bottom: 20px;
        height: auto;
    }
    
    .popt-final-left {
        order: 2;
    }
    
    .popt-desktop-nav-buttons {
        display: none !important;
    }
    
    .popt-btn-submit-desktop {
        display: none !important;
    }
    
    .popt-mobile-nav-buttons {
        display: block;
        order: 3;
    }
    
    .popt-summary-content {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .popt-form-row {
        grid-template-columns: 1fr;
    }
    
    .popt-item {
        padding: 20px;
    }
    
    .popt-add-buttons-row {
        flex-direction: column;
    }
    
    .popt-btn-add-other {
        width: 100%;
    }
    
    .popt-item-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .popt-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .popt-info-hero {
        padding: 30px 20px;
    }
    
    /* NA MALÝCH MOBILECH */
    .popt-info-main-title {
        font-size: 24px;
        white-space: normal;
    }
    
    .popt-info-subtitle {
        font-size: 14px;
    }
    
    .popt-step-title {
        font-size: 24px;
    }
    
    .popt-type-icon {
        width: 60px;
        height: 60px;
    }
    
    .popt-type-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .popt-type-card h3 {
        font-size: 17px;
    }
    
    .popt-type-card p {
        font-size: 13px;
    }
    
    .popt-input,
    .popt-select,
    .popt-textarea {
        font-size: 16px;
    }
    
    .popt-summary-content {
        max-height: 300px;
    }
}