/* ============================================
   PAFLORA Calculator Tarife - Modern Design 2026
   ============================================ */

:root {
    --primary: #0f766e;
    --primary-light: #14b8a6;
    --primary-dark: #0d5c56;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --bg: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: rgba(15, 118, 110, 0.12);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(20, 184, 166, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Container */
#container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Title */
#titlu {
    text-align: center;
    padding: 32px 20px 28px;
}

#titlu > p:first-child {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 8px;
}

#titlu > p:last-child {
    text-align: center;
    line-height: 1;
}

/* Content Layout */
#continut {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Left Panel */
#panel-stanga {
    flex: 1 1 68%;
    min-width: 0;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

/* Right Panel */
#panel-dreapta {
    flex: 0 0 30%;
    position: sticky;
    top: 20px;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    min-height: 120px;
}

#info-title-dreapta {
    text-align: center;
    color: rgba(255,255,255,0.92);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

#panel-dreapta > .list-option {
    color: rgba(255,255,255,0.9);
    font-size: 0.82rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    line-height: 1.5;
}

.prefix {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Top Info */
#top-info {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

#top-info > p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2px;
}

/* Option Elements */
.element {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.element::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}

.element:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.element-selected {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(20,184,166,0.08) 0%, rgba(15,118,110,0.05) 100%);
}

.element-selected::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 1;
}

.element * {
    position: relative;
    z-index: 1;
}

.element-selected:hover {
    background: linear-gradient(135deg, rgba(20,184,166,0.12) 0%, rgba(15,118,110,0.08) 100%);
}

/* Image Thumbnail */
.image {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #f8fafc;
}

.image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Option Text */
.option {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: transparent;
    line-height: 1.4;
}

.option > p:first-child {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

.option > p:last-child {
    line-height: 1;
    margin-top: 2px;
}

.element-more {
    margin-top: 4px;
}

/* Info Links */
.info-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color var(--transition);
}

.info-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

#titlu .info-link {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 500;
    font-style: normal;
}

/* Indent / Parent */
.indent {
    margin-left: 52px;
}

.parent {
    padding: 12px 0;
    font-weight: 700;
    color: var(--text);
}

/* Checkboxes Interior/Exterior */
.checks {
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    display: inline-flex;
    gap: 8px;
    z-index: 2;
}

.checks > ul {
    list-style-type: none;
    display: flex;
    gap: 8px;
}

.checks > ul > li {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.checks > ul > li input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Navigation Buttons */
#next-prev {
    display: flex;
    justify-content: space-between;
    padding: 20px 0 4px;
    gap: 12px;
}

.next-prev {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius);
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

#prev {
    background: #fff;
    color: var(--text);
    border: 2px solid var(--border);
}

#prev:hover {
    background: #f8fafc;
    border-color: var(--text-light);
}

#next, #trimite {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15,118,110,0.3);
}

#next:hover, #trimite:hover {
    box-shadow: 0 6px 20px rgba(15,118,110,0.4);
    transform: translateY(-1px);
}

#next:active, #trimite:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(15,118,110,0.3);
}

/* ============================================
   Form - Modern 2026
   ============================================ */
#formular {
    display: none;
}

#formular form {
    max-width: 520px;
    margin: 0 auto;
    padding: 28px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Form heading */
.form-heading {
    text-align: center;
    margin-bottom: 28px;
}

.form-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: 12px;
    filter: grayscale(0);
}

.form-heading h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.form-heading p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Form fields */
.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.required-star {
    color: #ef4444;
    font-weight: 700;
}

.optional-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 20px;
    margin-left: 4px;
    vertical-align: middle;
}

#formular input[type="text"],
#formular input[type="email"],
#formular input[type="tel"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    background: #f8fafc;
    transition: all var(--transition);
    outline: none;
}

#formular input[type="text"]:focus,
#formular input[type="email"]:focus,
#formular input[type="tel"]:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
}

#formular textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    background: #f8fafc;
    height: 88px;
    resize: vertical;
    transition: all var(--transition);
    outline: none;
}

#formular textarea:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
}

#formular input::placeholder,
#formular textarea::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

/* Two-column row */
.form-row-2col {
    display: flex;
    gap: 14px;
}

.form-row-2col .form-field {
    flex: 1;
    min-width: 0;
}

/* Captcha */
.form-captcha {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1.5px solid #e2e8f0;
}

.captcha-code {
    flex-shrink: 0;
}

.captcha-code input {
    width: 120px !important;
    padding: 10px 8px !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: 6px;
    color: var(--primary) !important;
    background: #fff !important;
    border: 2px dashed var(--primary-light) !important;
    border-radius: var(--radius-sm) !important;
    text-align: center;
    user-select: none;
    pointer-events: none;
    cursor: default;
}

.captcha-input {
    flex: 1;
    min-width: 0;
}

.captcha-input label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.captcha-input input {
    letter-spacing: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem !important;
}

/* Submit button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(15,118,110,0.3);
    letter-spacing: 0.01em;
}

.btn-submit:hover {
    box-shadow: 0 6px 24px rgba(15,118,110,0.4);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(15,118,110,0.3);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(15,118,110,0.15);
}

.btn-submit-text {
    color: #fff;
    font-size: 1rem;
}

.btn-submit-arrow {
    color: #fff;
    font-size: 1.2rem;
    transition: transform var(--transition);
}

.btn-submit:hover .btn-submit-arrow {
    transform: translateX(4px);
}

/* Denumire asociatie (hidden by default) */
#denumire-asociatie {
    display: none;
}

/* Totals in Right Panel */
.list-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: right;
}

.list-total p {
    color: rgba(255,255,255,0.92);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 8px 0;
}

.separator-total {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0 !important;
}

.total-general {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    padding-top: 8px;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.discount-text {
    color: var(--accent-light) !important;
    font-weight: 700 !important;
}

.infos-total {
    font-size: 0.7rem !important;
    color: rgba(255,255,255,0.55) !important;
    font-weight: 400 !important;
    font-style: italic;
    line-height: 1.4 !important;
    margin-top: 8px !important;
}

/* Success Message */
#success-message {
    padding: 24px;
    background: linear-gradient(135deg, rgba(20,184,166,0.1) 0%, rgba(34,197,94,0.08) 100%);
    border: 2px solid rgba(34,197,94,0.2);
    border-radius: var(--radius);
    color: var(--primary-dark);
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}

/* Custom nr scari */
#custom-nr-scari {
    width: 70px;
    text-align: center;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-family: var(--font);
    font-size: 0.95rem;
}

#custom-nr-scari:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.1);
}

/* Break on mobile helper */
.break-on-mobile {
    display: none;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
    #continut {
        flex-direction: column;
    }

    #panel-stanga {
        width: 100%;
    }

    #panel-dreapta {
        width: 100%;
        position: static;
    }

    .break-on-mobile {
        display: block;
    }
}

@media (max-width: 600px) {
    #container {
        padding: 12px 8px;
    }

    #titlu > p:first-child {
        font-size: 1.5rem;
    }

    #panel-stanga {
        padding: 16px 12px;
        border-radius: var(--radius);
    }

    #panel-dreapta {
        padding: 16px 12px;
        border-radius: var(--radius);
    }

    .element {
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .element-selected::after {
        top: 6px;
        right: 8px;
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .image {
        width: 44px;
        height: 44px;
    }

    .option > p:first-child {
        font-size: 0.88rem;
    }

    .checks {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        margin-top: 4px;
        padding-left: 58px;
    }

    .indent {
        margin-left: 10px;
    }

    #next-prev {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .next-prev {
        width: 100%;
        text-align: center;
    }

    #formular form {
        padding: 20px 16px;
    }

    .form-row-2col {
        flex-direction: column;
        gap: 0;
    }

    .form-captcha {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .captcha-code {
        text-align: center;
    }

    #custom-nr-scari {
        float: right;
        margin-top: 10px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.element {
    animation: fadeInUp 0.35s ease-out both;
}

.element:nth-child(1) { animation-delay: 0s; }
.element:nth-child(2) { animation-delay: 0.04s; }
.element:nth-child(3) { animation-delay: 0.08s; }
.element:nth-child(4) { animation-delay: 0.12s; }
.element:nth-child(5) { animation-delay: 0.16s; }
.element:nth-child(6) { animation-delay: 0.2s; }
.element:nth-child(7) { animation-delay: 0.24s; }
.element:nth-child(8) { animation-delay: 0.28s; }
.element:nth-child(9) { animation-delay: 0.32s; }
.element:nth-child(10) { animation-delay: 0.36s; }
.element:nth-child(11) { animation-delay: 0.4s; }
.element:nth-child(12) { animation-delay: 0.44s; }
.element:nth-child(13) { animation-delay: 0.48s; }
.element:nth-child(14) { animation-delay: 0.52s; }
.element:nth-child(15) { animation-delay: 0.56s; }
.element:nth-child(16) { animation-delay: 0.6s; }
.element:nth-child(17) { animation-delay: 0.64s; }
.element:nth-child(18) { animation-delay: 0.68s; }
.element:nth-child(19) { animation-delay: 0.72s; }

.list-option {
    animation: fadeInUp 0.3s ease-out both;
}

.list-total {
    animation: fadeInUp 0.4s ease-out both;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    body {
        background: #fff;
    }
    #next-prev, #top-info, #formular, .info-link, #titlu > p:last-child {
        display: none !important;
    }
    #panel-stanga, #panel-dreapta {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
