/* ===================================
   Calculator Page Styles
====================================== */

.calculator-section {
    padding: 120px 0 160px;
    background-color: var(--darker);
    position: relative;
}

.calculator-container {
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-default);
    position: relative;
    overflow: hidden;
    background: rgb(0 0 0 / 27%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 133, 0, 0.01) 0%, rgba(255, 133, 0, 0.02) 100%);
    pointer-events: none;
}

/* ===================================
   Calculator Title
====================================== */

.calculator-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.calculator-title h1 {
    color: var(--white);
    font-size: 3rem;
    font-weight: 600;
}

.calculator-title p {
    color: var(--white);
}

/* ===================================
   Table Styles
====================================== */

.calculator-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--darker);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.calculator-table th {
    background: linear-gradient(135deg, var(--dark-gray) 0%, #2a2a2a 100%);
    color: var(--white);
    padding: 24px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 2px solid var(--border-default);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 70px;
}

.calculator-table th:first-child {
    text-align: center;
    padding-left: 30px;
}

.calculator-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    background: var(--darker);
    transition: background-color 0.3s ease;
    height: 85px;
    vertical-align: middle;
    text-wrap-mode: nowrap;
    width: auto;
}

.calculator-table td:last-child {
    border-right: none;
}

.calculator-table tr:last-child td {
    border-bottom: none;
}

.calculator-table tr:hover td {
    background: rgb(255 255 255 / 1%);
}

/* ===================================
   Commodity Labels
====================================== */

.commodity-label {
    background: linear-gradient(135deg, var(--dark-gray) 0%, #2a2a2a 100%);
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 30px;
    width: 180px;
    min-width: 180px;
    text-align: center;
    border-right: 2px solid var(--border-default);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 85px;
}

/* ===================================
   Input Styles
====================================== */

.calculator-input {
    width: 100%;
    background: var(--dark);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--white);
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    font-family: var(--primary-font);
    height: 42px;
}

.calculator-input:focus {
    outline: none;
    border-color: var(--base-color);
    background: rgba(255, 133, 0, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 133, 0, 0.1);
    transform: translateY(-1px);
}

.calculator-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.calculator-input.changed {
    background: rgba(255, 133, 0, 0.05);
    border-color: var(--base-color);
    box-shadow: 0 0 0 4px rgba(255, 133, 0, 0.1);
    animation: inputChanged 1.5s ease-out;
}

@keyframes inputChanged {
    0% {
        background: rgba(255, 133, 0, 0.1);
        border-color: var(--base-color);
        transform: scale(1.02);
    }
    100% {
        background: rgba(255, 133, 0, 0.05);
        border-color: var(--base-color);
        transform: scale(1);
    }
}

/* ===================================
   Unit Headers
====================================== */

.unit-header {
    position: relative;
    font-size: 15px;
    font-weight: 600;
}

.unit-header .unit-full {
    display: block;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.6;
    text-transform: none;
    letter-spacing: 0;
}

/* ===================================
   FAQ Section Styles
====================================== */

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--dark);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 133, 0, 0.3);
}

.faq-item[open] {
    border-color: var(--border-default);
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    background: var(--dark);
    transition: all 0.3s ease;
    position: relative;
}

.faq-question::marker {
    display: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question h3 {
    color: var(--white);
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    padding-right: 20px;
}

.faq-icon {
    color: var(--base-color);
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-question {
    background: rgb(255 255 255 / 2%);
    border-bottom: 1px solid var(--border-default);
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 32px;
    background: var(--dark);
}

.faq-answer p {
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

/* ===================================
   Step Badge Styles
====================================== */

.step-badge {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.step-badge .badge {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
}

/* ===================================
   Responsive Design
====================================== */

@media (max-width: 1199px) {
    .calculator-container {
        padding: 35px 25px;
    }
    
    .calculator-title h1 {
    font-size: 2.4rem;
    line-height: 1.4;
    }
    
    .commodity-label {
        width: 160px;
        min-width: 160px;
        font-size: 14px;
        padding: 18px 25px;
    }
}

@media (max-width: 991px) {
    .calculator-section {
        padding: 100px 0 60px;
    }
    
    .calculator-container {
        padding: 30px 20px;
    }
    
    .calculator-table th,
    .calculator-table td {
        padding: 16px 12px;
        font-size: 14px;
        height: 60px;
    }
    
    .commodity-label {
        font-size: 13px;
        width: 140px;
        min-width: 140px;
        padding: 16px 20px;
        height: 60px;
    }
    
    .calculator-input {
        font-size: 14px;
        padding: 8px 12px;
        height: 38px;
    }
    
    .calculator-title h1 {
    font-size: 32px;
    line-height: 1.3;
    }
    
    .calculator-title p {
    }
    
    .faq-question {
        padding: 20px 25px;
    }
    
    .faq-question h3 {
        font-size: 20px;
    }
    
    .faq-answer {
        padding: 0 25px 20px;
    }
}

@media (max-width: 767px) {
    .calculator-section {
        padding: 80px 0 50px;
    }
    
    .calculator-container {
        padding: 25px 15px;
        border-radius: 16px;
    }
    
    .calculator-title {
        margin-bottom: 30px;
    }
    
    .calculator-title h1 {
    }
    
    .calculator-title p {
    font-size: 16px;
    margin-bottom: 0;
    }
    
    /* Mobile Table Layout */
    .calculator-table,
    .calculator-table thead,
    .calculator-table tbody,
    .calculator-table th,
    .calculator-table td,
    .calculator-table tr {
        display: block;
    }
    
    .calculator-table thead {
        display: none;
    }
    
    .calculator-table tbody {
        display: block;
    }
    
    .calculator-table tr {
        display: block;
        margin-bottom: 0;
        background: var(--dark);
        border-radius: 12px;
        padding: 20px;
        border: 1px solid var(--border-default);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .calculator-table tr:hover {
        background: var(--dark);
    }
    
    .calculator-table td {
        display: block;
        text-align: left;
        padding: 12px 0;
        border: none;
        background: transparent;
        position: relative;
        height: auto;
        font-size: 18px;
    }
    
    .calculator-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 12px;
        width: 60%;
        color: var(--base-color);
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-wrap: auto;
    }
    
    .commodity-label {
        display: block;
        width: 100%;
        background: linear-gradient(135deg, var(--base-color) 0%, #e57600 100%);
        border-radius: 8px;
        margin-bottom: 20px;
        text-align: center;
        color: var(--white);
        border: none;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 700;
        height: auto;
    }
    
    .calculator-input {
        margin-left: 50%;
        width: calc(50% - 10px);
        font-size: 16px;
        padding: 12px 16px;
        height: 44px;
    }
    
    .faq-question {
        padding: 18px 20px;
    }
    
    .faq-question h3 {
        font-size: 18px;
        padding-right: 15px;
    }
    
    .faq-answer {
        padding: 0 20px 18px;
    }
    
    .faq-answer p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 20px 12px;
    }
    
    .calculator-title h1 {
        font-size: 24px;
        line-height: 1.2;
        font-weight: 600;
    }
    
    .calculator-table tr {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .commodity-label {
        font-size: 15px;
        padding: 14px 16px;
    }
    
    .calculator-input {
        margin-left: 50%;
        width: calc(50% - 8px);
        font-size: 15px;
        padding: 10px 14px;
        height: 42px;
    }
    
    .calculator-table td:before {
        width: 50%;
        font-size: 13px;
    }
    
    .faq-question {
        padding: 16px 18px;
    }
    
    .faq-answer {
        padding: 0 18px 16px;
    }
}

/* ===================================
   Example Card Styles - Price Calculator
====================================== */

.example-card {
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 133, 0, 0.02) 0%, rgba(255, 133, 0, 0.01) 100%);
    pointer-events: none;
}

.example-card:hover {
    border-color: rgba(255, 133, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.example-card h4 {
    position: relative;
    z-index: 2;
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1.125rem;
}

.example-card p {
    position: relative;
    z-index: 2;
    color: var(--text-body);
    margin-bottom: 16px;
    line-height: 1.6;
}

.example-card ul {
    position: relative;
    z-index: 2;
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-card li {
    color: var(--text-body);
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
}

.example-card li:last-child {
    border-bottom: none;
}

.example-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--base-color);
    font-weight: bold;
}

.example-card strong {
    color: var(--base-color);
    font-weight: 600;
}

/* Mobile responsiveness for example cards */
@media (max-width: 767px) {
    .example-card {
        padding: 24px;
        margin-bottom: 20px;
    }
    
    .example-card h4 {
        font-size: 1rem;
        margin-bottom: 14px;
    }
    
    .example-card li {
        font-size: 0.85rem;
        padding: 6px 0;
    }
}

/* ===================================
   Dark Theme Enhancements
====================================== */

.calculator-table th {
    background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    border-bottom: 2px solid rgb(255 255 255 / 10%);
}

.calculator-table tr:hover td:not(.commodity-label) {
    background: rgb(255 255 255 / 1%);
}

/* ===================================
   Loading Animation (Optional)
====================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-container {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   Accessibility Improvements
====================================== */

.calculator-input:focus-visible {
    outline: 2px solid var(--base-color);
        outline-offset: 2px;
}
    
.faq-question:focus {
    outline: 0px;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .calculator-container,
    .calculator-input,
    .calculator-table tr,
    .calculator-input.changed,
    .faq-item,
    .faq-icon {
        animation: none;
        transition: none;
    }
}

/* ===================================
   Print Styles
====================================== */

@media print {
    .calculator-section {
        background: white;
        color: black;
    }
    
    .calculator-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .faq-container {
        break-inside: avoid;
    }
}