/* ==========================================================================
   SHIPDAY LOGISTICS — PERCENTAGE CALCULATOR STYLES
   Primary Color: #3d9119
   ========================================================================== */

.calc-section {
    padding: var(--space-12, 60px) 0;
    background: linear-gradient(180deg, var(--light-1, #f8fafc) 0%, #ffffff 100%);
}

.calc-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.calc-main-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(61, 145, 25, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(61, 145, 25, 0.15);
    overflow: hidden;
}

.calc-header {
    background: linear-gradient(135deg, #2b6912 0%, #3d9119 100%);
    color: #ffffff;
    padding: 28px 30px;
    text-align: center;
    position: relative;
}

.calc-header h2 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calc-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.98rem;
    margin-bottom: 16px;
}

.btn-calc-reset-all {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.btn-calc-reset-all:hover {
    background: #ffffff;
    color: #3d9119;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cards Container & Individual Rows */
.calc-cards-container {
    padding: 32px 30px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.calc-row-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.calc-row-card:hover {
    border-color: rgba(61, 145, 25, 0.35);
    box-shadow: 0 8px 20px rgba(61, 145, 25, 0.06);
}

.calc-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.calc-card-badge {
    background: rgba(61, 145, 25, 0.1);
    color: #3d9119;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
}

.calc-card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.calc-card-prompt {
    font-size: 1.05rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

.calc-highlight {
    color: #3d9119;
    font-weight: 800;
}

/* Form Grid & Input Styling */
.calc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.calc-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.calc-input-suffix {
    position: absolute;
    right: 14px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    pointer-events: none;
}

.calc-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.calc-input.has-suffix {
    padding-right: 40px;
}

.calc-input.no-prefix-icon {
    padding-left: 16px;
}

.calc-input:focus {
    background: #ffffff;
    border-color: #3d9119;
    box-shadow: 0 0 0 4px rgba(61, 145, 25, 0.15);
}

.calc-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Action Buttons */
.calc-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-calc-submit {
    background: #3d9119;
    color: #ffffff;
    border: none;
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(61, 145, 25, 0.2);
}

.btn-calc-submit:hover {
    background: #317714;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(61, 145, 25, 0.3);
}

.btn-calc-reset {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-calc-reset:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

/* Result Box */
.calc-result-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 18px 20px;
    display: none;
    position: relative;
    margin-top: 14px;
    animation: popResult 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popResult {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.calc-result-box.active {
    display: block;
}

.calc-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calc-result-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-copy-btn {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-copy-btn:hover {
    background: #15803d;
    color: #ffffff;
}

.calc-result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #14532d;
    line-height: 1.2;
    margin-bottom: 6px;
    word-break: break-word;
}

.calc-result-breakdown {
    font-size: 0.92rem;
    color: #166534;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.75);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #22c55e;
}

/* Error Box */
.calc-error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.calc-error-box.active {
    display: flex;
}

/* Features Grid */
.calc-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.calc-feature-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.calc-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(61, 145, 25, 0.1);
    border-color: rgba(61, 145, 25, 0.3);
}

.calc-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(61, 145, 25, 0.1);
    color: #3d9119;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.calc-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.calc-feature-card p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .calc-header {
        padding: 20px 16px;
    }
    .calc-header h2 {
        font-size: 1.3rem;
    }
    .calc-cards-container {
        padding: 20px 16px;
        gap: 20px;
    }
    .calc-row-card {
        padding: 18px 16px;
    }
    .calc-result-value {
        font-size: 1.5rem;
    }
    .calc-actions {
        flex-direction: column;
    }
    .btn-calc-submit, .btn-calc-reset {
        width: 100%;
        justify-content: center;
    }
}
