/* ACS Freight Calculator - Frontend Styles */
:root {
    --acs-fc-primary: #1a56db;
    --acs-fc-accent: #e8eefb;
}

.acs-fc {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    color: #1e293b;
    line-height: 1.6;
}
.acs-fc *, .acs-fc *::before, .acs-fc *::after {
    box-sizing: border-box;
}
.acs-fc__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--acs-fc-primary);
    margin: 0 0 .4rem;
    text-align: center;
}
.acs-fc__subtitle {
    text-align: center;
    font-size: .85rem;
    color: #64748b;
    margin: 0 0 1.5rem;
}

/* Tabs */
.acs-fc__tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--acs-fc-primary);
}
.acs-fc__tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: .95rem;
    transition: all .2s;
    background: #fff;
    color: var(--acs-fc-primary);
    border: none;
    font-family: inherit;
}
.acs-fc__tab--active {
    background: var(--acs-fc-primary);
    color: #fff;
}
.acs-fc__tab:hover:not(.acs-fc__tab--active) {
    background: var(--acs-fc-accent);
}

/* Sections */
.acs-fc__section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}
.acs-fc__section-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--acs-fc-primary);
    margin-bottom: .8rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--acs-fc-primary);
}

/* Form Fields */
.acs-fc__row {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: .8rem;
}
.acs-fc__row:last-child {
    margin-bottom: 0;
}
.acs-fc__field {
    flex: 1;
    min-width: 200px;
}
.acs-fc__field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: .3rem;
}
.acs-fc__hint {
    font-weight: 400;
    color: #94a3b8;
    margin-left: .3rem;
}
.acs-fc__field input[type="number"],
.acs-fc__field input[type="text"],
.acs-fc__field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
    background: #fff;
    color: #1e293b;
}
.acs-fc__field input:focus,
.acs-fc__field select:focus {
    outline: none;
    border-color: var(--acs-fc-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .15);
}

/* Checkboxes */
.acs-fc__checks {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .8rem;
}
.acs-fc__check {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}
.acs-fc__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--acs-fc-primary);
    cursor: pointer;
}
.acs-fc__check span {
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
}

/* Button */
.acs-fc__btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--acs-fc-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    margin-top: 1rem;
    font-family: inherit;
}
.acs-fc__btn:hover {
    opacity: .9;
}
.acs-fc__btn:active {
    opacity: .8;
}

/* Results */
.acs-fc__result {
    margin-top: 1.5rem;
}
.acs-fc__result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.acs-fc__result-table th,
.acs-fc__result-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: .9rem;
}
.acs-fc__result-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
}
.acs-fc__result-table td:last-child {
    text-align: right;
    font-weight: 600;
}
.acs-fc__result-table tr.acs-fc__row--total {
    background: var(--acs-fc-primary);
    color: #fff;
}
.acs-fc__result-table tr.acs-fc__row--total td {
    font-weight: 700;
    font-size: 1rem;
    border: none;
}
.acs-fc__result-table tr.acs-fc__row--tax {
    background: var(--acs-fc-accent);
}
.acs-fc__result-table tr.acs-fc__row--tax td {
    font-weight: 700;
    color: var(--acs-fc-primary);
    border: none;
}
.acs-fc__result-table tr.acs-fc__row--subtotal {
    background: #f1f5f9;
}
.acs-fc__result-table tr.acs-fc__row--subtotal td {
    font-weight: 600;
}

/* Details */
.acs-fc__details {
    margin-top: .5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: .8rem;
}
.acs-fc__details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    color: var(--acs-fc-primary);
}
.acs-fc__detail-content {
    margin-top: .6rem;
    font-size: .82rem;
    color: #475569;
    line-height: 1.8;
}

/* Footer */
.acs-fc__footer {
    text-align: center;
    margin-top: 1rem;
}
.acs-fc__version {
    font-size: .75rem;
    color: #94a3b8;
    margin: 0 0 .3rem;
}
.acs-fc__credit {
    font-size: .7rem;
    color: #94a3b8;
    margin: 0;
}
.acs-fc__credit a {
    color: #64748b;
    text-decoration: none;
}
.acs-fc__credit a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .acs-fc__field {
        min-width: 100%;
    }
    .acs-fc__row {
        gap: .5rem;
    }
    .acs-fc__section {
        padding: .8rem;
    }
    .acs-fc__result-table th,
    .acs-fc__result-table td {
        padding: 8px 10px;
        font-size: .82rem;
    }
    .acs-fc__tabs {
        flex-direction: column;
    }
}
