/* ═══════════════════════════════════════════════════════════
   Apostille Configurator — Frontend Styles
   Brand: #12223C (navy), #55637D (mid blue), #CAA967 (gold)
   ═══════════════════════════════════════════════════════════ */

.apc-wrap {
    max-width: 760px;
    margin: 0 auto 40px auto;
    font-family: inherit;
    color: #333;
}

/* ── Step indicator ── */
.apc-steps {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.apc-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.apc-step.active {
    background: #12223C;
    color: #fff;
}

.apc-step.done {
    background: #e8f0e8;
    color: #46b450;
}

.apc-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.apc-step.active .apc-step-num {
    background: #CAA967;
    color: #12223C;
}

.apc-step-arrow {
    color: #ccc;
    font-size: 20px;
    line-height: 1;
}

/* ── Panel ── */
.apc-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 28px 32px;
}

.apc-panel-title {
    color: #12223C !important;
    font-size: 1.2em !important;
    font-weight: 700 !important;
    margin: 0 0 24px 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-bottom: 2px solid #CAA967;
    padding-bottom: 12px;
}

/* ── Fields ── */
.apc-field {
    margin-bottom: 20px;
}

.apc-field label {
    display: block;
    font-weight: 600;
    color: #12223C;
    margin-bottom: 6px;
    font-size: 14px;
}

.apc-field select,
.apc-field input[type="text"],
.apc-field input[type="date"],
.apc-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.apc-field select:focus,
.apc-field input:focus,
.apc-field textarea:focus {
    outline: none;
    border-color: #55637D;
    background: #fff;
}

.apc-field input[type="file"] {
    padding: 8px 0;
    border: none;
    background: none;
    font-size: 14px;
}

/* ── Document list (checkboxes/radio) ── */
.apc-doc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.apc-doc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.apc-doc-item:hover {
    border-color: #55637D;
    background: #f8f9fb;
}

.apc-doc-item.selected {
    border-color: #12223C;
    background: #f0f4f8;
}

.apc-doc-item input[type="checkbox"],
.apc-doc-item input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #12223C;
    width: 16px;
    height: 16px;
}

.apc-doc-item-content {
    flex: 1;
}

.apc-doc-item-label {
    font-weight: 600;
    color: #12223C;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apc-doc-item-price {
    color: #CAA967;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.apc-doc-item-desc {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Radio group ── */
.apc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apc-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.apc-radio:hover {
    border-color: #55637D;
    background: #f8f9fb;
}

.apc-radio input[type="radio"] {
    accent-color: #12223C;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Checkbox options (services) ── */
.apc-checkbox-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.apc-checkbox-option:hover {
    border-color: #55637D;
    background: #f8f9fb;
}

.apc-checkbox-option input[type="checkbox"] {
    display: none; /* hidden, label acts as toggle */
}

.apc-checkbox-option.checked {
    border-color: #12223C;
    background: #f0f4f8;
}

.apc-checkbox-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #12223C;
    font-size: 14px;
}

.apc-price {
    color: #CAA967;
    font-weight: 700;
    white-space: nowrap;
}

.apc-service-intro {
    color: #555;
    font-size: 14px;
    margin: 0 0 16px 0;
}

/* ── Notices ── */
.apc-notice {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    margin: 12px 0;
}

.apc-notice-info {
    background: #e8f0fa;
    border-left: 4px solid #55637D;
    color: #12223C;
}

.apc-notice-warn {
    background: #fff8e8;
    border-left: 4px solid #CAA967;
    color: #7a5c00;
}

.apc-notice-success {
    background: #e8f5e9;
    border-left: 4px solid #46b450;
    color: #1a5c1a;
}

.apc-notice-error {
    background: #fce8e8;
    border-left: 4px solid #d63638;
    color: #7a0000;
}

/* ── Hints ── */
.apc-hint {
    color: #888;
    font-size: 12px;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.apc-hint a {
    color: #55637D;
}

.apc-optional {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.apc-required {
    color: #d63638;
}

/* ── Navigation buttons ── */
.apc-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.apc-btn-next,
.apc-btn-cart {
    background: #12223C;
    color: #fff;
    border: 2px solid #CAA967;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.apc-btn-next:hover,
.apc-btn-cart:hover {
    background: #55637D;
    border-color: #CAA967;
}

.apc-btn-next:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.apc-btn-back {
    background: transparent;
    color: #55637D;
    border: 1px solid #ccc;
    padding: 11px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
    font-family: inherit;
}

.apc-btn-back:hover {
    border-color: #55637D;
}

/* ── Summary (step 4) ── */
.apc-summary {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.apc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.apc-summary-row:last-child {
    border-bottom: none;
}

.apc-summary-row-label {
    color: #555;
}

.apc-summary-row-price {
    color: #12223C;
    font-weight: 600;
}

.apc-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #12223C;
    color: #fff;
    border-radius: 4px;
    margin-top: 12px;
}

.apc-total-label {
    font-size: 16px;
    font-weight: 700;
}

.apc-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #CAA967;
}

/* ── Loading state ── */
.apc-btn-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}

.apc-btn-cart.loading::after {
    content: ' ...';
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .apc-panel {
        padding: 20px 16px;
    }
    .apc-steps {
        gap: 2px;
    }
    .apc-step-label {
        display: none;
    }
    .apc-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .apc-btn-next,
    .apc-btn-cart,
    .apc-btn-back {
        text-align: center;
    }
}

/* ── Delivery choice ── */
.apc-radio-delivery {
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    align-items: flex-start;
    gap: 12px;
}

.apc-radio-delivery:hover {
    border-color: #55637D;
    background: #f8f9fb;
}

.apc-radio-delivery.apc-delivery-selected {
    border-color: #12223C;
    background: #f0f4f8;
}

.apc-radio-delivery small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 3px;
    font-weight: 400;
}

.apc-price-inline {
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   Cart item display
   ═══════════════════════════════════════════════════════════ */

.apc-cart-title {
    display: block;
    font-weight: 700;
    color: #12223C;
    font-size: 1em;
    margin-bottom: 6px;
}

.apc-cart-details {
    margin-top: 6px;
}

.apc-cart-list {
    list-style: none;
    margin: 4px 0 8px 0 !important;
    padding: 0 !important;
}

.apc-cart-list li {
    padding: 2px 0 2px 14px !important;
    position: relative;
    font-size: 12px;
    line-height: 1.5;
    color: #555;
    border: none !important;
}

.apc-cart-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #CAA967;
    font-size: 14px;
    line-height: 1.3;
}

.apc-cart-item-price {
    color: #12223C;
    font-weight: 600;
}

.apc-cart-item-free {
    color: #46b450;
    font-weight: 600;
}

.apc-cart-meta {
    border-top: 1px solid #f0f0f0 !important;
    padding-top: 4px !important;
    margin-top: 4px !important;
}

.apc-meta-key {
    color: #888;
    font-weight: 600;
}

.apc-cart-note {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0 0 !important;
    font-style: italic;
}

/* Back to order form notice */
.apc-cart-back-notice {
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f0f4f8;
    border-left: 3px solid #55637D;
    border-radius: 3px;
}

.apc-back-link {
    color: #55637D !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.apc-back-link:hover {
    color: #12223C !important;
}

/* ═══════════════════════════════════════════════════════════
   Cart reformatted display (injected by cart.js)
   ═══════════════════════════════════════════════════════════ */

.apc-cart-doc-name {
    font-weight: 700 !important;
    color: #12223C !important;
    font-size: 0.95em !important;
    margin: 4px 0 6px 0 !important;
}

.apc-cart-services-list,
.apc-cart-meta-list {
    list-style: none !important;
    margin: 2px 0 6px 0 !important;
    padding: 0 !important;
}

.apc-cart-services-list li,
.apc-cart-meta-list li {
    padding: 2px 0 2px 14px !important;
    position: relative !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #555 !important;
    border: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
}

.apc-cart-services-list li::before {
    content: "•" !important;
    position: absolute !important;
    left: 0 !important;
    color: #CAA967 !important;
}

.apc-cart-meta-list li {
    display: block !important;
}

.apc-cart-meta-list li::before {
    content: "–" !important;
    position: absolute !important;
    left: 0 !important;
    color: #aaa !important;
}

.apc-cart-service-label {
    flex: 1 !important;
    color: #333 !important;
    padding-right: 8px !important;
}

.apc-cart-price {
    color: #12223C !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.apc-cart-free {
    color: #46b450 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.apc-cart-meta-list {
    border-top: 1px dotted #ddd !important;
    padding-top: 4px !important;
    margin-top: 4px !important;
}

.apc-meta-key {
    color: #888 !important;
    font-weight: 600 !important;
}
