/**
 * LED Module Calculator Styles
 * Optimized for conversion and user experience
 */

/* ==========================================
   CONTAINER & LAYOUT
========================================== */
.led-calculator-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    
}

.led-calculator-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 3.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   HEADER SECTION
========================================== */
.calculator-header {
    text-align: center;
    margin-bottom: 3.2rem;
    padding-bottom: 2.4rem;
    border-bottom: 2px solid #f0f0f0;
}

.calculator-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

.calculator-title .icon {
    font-size: 3.2rem;
}

.calculator-subtitle {
    font-size: 1.6rem;
    color: var(--color-text-post);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   STEP SYSTEM
========================================== */
.calculator-step {
    display: none;
}

.calculator-step.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

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

.step-header {
    margin-bottom: 2.4rem;
}

.step-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--red-brand), #E8494C);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.step-header h4 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-black);
    margin: 0;
}

/* ==========================================
   FORM ELEMENTS
========================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2.4rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.form-group label .icon {
    font-size: 1.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.6rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red-brand);
    box-shadow: 0 0 0 4px var(--action-trans-40);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.helper-text {
    font-size: 1.3rem;
    color: #666;
    margin-top: 0.6rem;
}

/* ==========================================
   RADIO CARDS (Environment Selection)
========================================== */
.radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.6rem;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.radio-card input[type="radio"]:checked + .radio-content {
    border-color: var(--red-brand);
    background: var(--action-trans-40);
}

.radio-content strong {
    font-size: 1.6rem;
    color: var(--color-black);
}

.radio-content small {
    font-size: 1.3rem;
    color: var(--color-text-post);
}

/* ==========================================
   BUTTONS
========================================== */
.btn-calculate,
.btn-submit {
    width: 100%;
    padding: 1.6rem 3.2rem;
    background: linear-gradient(135deg, var(--red-brand), #E8494C);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 4px 16px rgba(193, 52, 55, 0.3);
}

.btn-calculate:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(193, 52, 55, 0.4);
    background: linear-gradient(135deg, var(--color-hover-brand), #D93134);
}

.btn-calculate:active,
.btn-submit:active {
    transform: translateY(0);
}

.btn-back {
    padding: 1.2rem 2.4rem;
    background: #f5f5f5;
    color: var(--color-text-post);
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #e5e5e5;
}

.button-group {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    margin-top: 2.4rem;
}

/* ==========================================
   RESULTS SECTION
========================================== */
.results-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.summary-card .label {
    font-size: 1.3rem;
    color: var(--color-text-post);
    font-weight: 500;
}

.summary-card .value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--red-brand);
}

/* ==========================================
   PIXEL PITCH OPTIONS
========================================== */
.pixel-pitch-options {
    display: grid;
    gap: 1.6rem;
    margin-bottom: 2.4rem;
}

.pitch-option {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pitch-option:hover {
    border-color: var(--red-brand);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.pitch-option.recommended {
    border-color: var(--red-brand);
    background: var(--action-trans-40);
}

.pitch-option.recommended::before {
    content: "✓ PHÙ HỢP NHẤT";
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--red-brand);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.pitch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.pitch-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-black);
}

.pitch-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--red-brand);
}

.pitch-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.detail-label {
    font-size: 1.2rem;
    color: #666;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-black);
}

.pitch-info {
    font-size: 1.4rem;
    color: var(--color-text-post);
    line-height: 1.6;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.btn-select-pitch {
    width: 100%;
    padding: 1.2rem;
    background: var(--red-brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-pitch:hover {
    background: var(--color-hover-brand);
    transform: translateY(-1px);
}

/* ==========================================
   SELECTED OPTION SUMMARY
========================================== */
.selected-option-summary {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px solid var(--red-brand);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.4rem;
}

.selected-option-summary h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

.summary-item-label {
    font-size: 1.4rem;
    color: var(--color-text-post);
}

.summary-item-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-black);
}

.summary-item.total {
    grid-column: 1 / -1;
    padding-top: 1.2rem;
    border-top: 2px dashed #e5e5e5;
}

.summary-item.total .summary-item-label {
    font-size: 1.6rem;
    font-weight: 600;
}

.summary-item.total .summary-item-value {
    font-size: 2.2rem;
    color: var(--red-brand);
}

/* ==========================================
   SUCCESS MESSAGE
========================================== */
.success-message {
    text-align: center;
    padding: 3.2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    margin: 0 auto 2.4rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.success-message h3 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 1.2rem;
}

.success-message > p {
    font-size: 1.6rem;
    color: var(--color-text-post);
    line-height: 1.8;
    margin-bottom: 2.4rem;
}

.next-steps {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2.4rem;
    margin-bottom: 2.4rem;
    text-align: left;
}

.next-steps h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 1.6rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    font-size: 1.5rem;
    color: var(--color-text-post);
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.next-steps li:last-child {
    border-bottom: none;
}

.next-steps a {
    color: var(--red-brand);
    text-decoration: none;
    font-weight: 600;
}

.next-steps a:hover {
    text-decoration: underline;
}

/* ==========================================
   TRUST BADGES
========================================== */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 3.2rem;
    padding-top: 2.4rem;
    border-top: 2px solid #f0f0f0;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.6rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.badge-icon {
    font-size: 2.4rem;
}

.badge-text {
    font-size: 1.3rem;
    color: var(--color-text-post);
    text-align: center;
    font-weight: 500;
}

/* ==========================================
   STICKY CTA (Mobile)
========================================== */
.sticky-cta-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.2rem;
    background: white;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.btn-sticky-cta {
    width: 100%;
    padding: 1.4rem;
    background: linear-gradient(135deg, var(--red-brand), #E8494C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

/* ==========================================
   LOADING STATE
========================================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 100;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--red-brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 768px) {
    .led-calculator-container {
        padding: 2rem 1.6rem;
        border-radius: 12px;
    }

    .calculator-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.8rem;
    }

    .calculator-subtitle {
        font-size: 1.4rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    .pitch-details {
        grid-template-columns: 1fr;
    }

    .summary-details {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

    .sticky-cta-mobile {
        display: block;
    }

    /* Add padding to prevent content from being hidden by sticky CTA */
    .led-calculator-wrapper {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .calculator-title {
        font-size: 2rem;
    }

    .step-header h4 {
        font-size: 1.8rem;
    }

    .pitch-name {
        font-size: 1.8rem;
    }

    .pitch-price {
        font-size: 1.6rem;
    }
}

/* ==========================================
   PRINT STYLES (Optional)
========================================== */
@media print {
    .btn-calculate,
    .btn-submit,
    .btn-back,
    .sticky-cta-mobile {
        display: none;
    }

    .led-calculator-container {
        box-shadow: none;
        border: 1px solid #e5e5e5;
    }
}