/*
Theme Name: Shoptimizer Child Theme
Theme URI: 
Description: Child theme of Shoptimizer
Author: CommerceGurus
Author URI: 
Template: shoptimizer
Version: 1.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* JAPAN-SPEC CALCULATOR STYLES */

:root {
    --jspec-brand: #06122a;
    --jspec-brand-light: #0d1f3c;
    --jspec-steel-light: #8a9bae;
    --jspec-steel: #5a6a7a;
    --jspec-steel-dark: #3a4a5a;
    --jspec-accent: #4a90d9;
    --jspec-accent-hover: #5ba0e9;
    --jspec-success: #2dd4bf;
    --jspec-text: #ffffff;
    --jspec-text-muted: #a0aec0;
    --jspec-border: rgba(138, 155, 174, 0.3);
    --jspec-bg-card: rgba(13, 31, 60, 0.6);
    --jspec-error: #f87171;
}

/* JSPEC KEY PRODUCT ATTRIBUTES START */
.jspec-key-attributes-wrapper {
    margin: 25px 0 20px !important;
    max-width: 480px !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* Кнопка-переключатель в стальном стиле */
.jspec-key-attributes-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 20%, #cbd5e1 60%, #94a3b8 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.jspec-key-attributes-toggle:hover {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

.jspec-toggle-title {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.jspec-toggle-arrow {
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: bold !important;
    transition: transform 0.2s ease !important;
}

/* Тело выпадающего списка */
.jspec-key-attributes-body {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.2s ease !important;
}

.jspec-key-attributes-body.jspec-expanded {
    max-height: 600px !important;
    opacity: 1 !important;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), opacity 0.2s ease !important;
}

.single-product .jspec-key-attributes {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 8px 18px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-top: 0 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
    text-shadow: none !important;
}

.single-product .jspec-key-attributes__item {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.1) !important;
}

.single-product .jspec-key-attributes__item:last-child {
    border-bottom: 0 !important;
}

.single-product .jspec-key-attributes__label {
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.single-product .jspec-key-attributes__value {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: right !important;
}
/* JSPEC KEY PRODUCT ATTRIBUTES END */

.jspec-calculator {
    max-width: 620px !important;
    margin: 2.5rem auto 6rem auto !important;
    padding: 2.5rem !important;
    background: #06122a !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px -15px rgba(6, 18, 42, 0.7), 0 0 0 1px rgba(138, 155, 174, 0.15) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    position: relative !important;
    overflow: hidden !important;
}

.jspec-calculator::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
}

.jspec-calc-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
    position: relative !important;
    z-index: 1 !important;
}

.jspec-calc-title {
    font-size: 1.85rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 0.5rem 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #8a9bae 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.jspec-calc-subtitle {
    color: #a0aec0 !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
}

.jspec-calc-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    position: relative !important;
    z-index: 1 !important;
}

.jspec-calc-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.jspec-calc-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #a0aec0 !important;
}

.jspec-calc-input,
.jspec-calc-select {
    padding: 0.875rem 1rem !important;
    background: rgba(13, 31, 60, 0.6) !important;
    border: 1px solid rgba(138, 155, 174, 0.3) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    transition: all 0.25s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    width: 100% !important;
}

.jspec-calc-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    height: 52px !important;
    line-height: 1.4 !important;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    cursor: pointer !important;
}

.jspec-calc-input:focus,
.jspec-calc-select:focus {
    outline: none !important;
    border-color: #4a90d9 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(74, 144, 217, 0.25) !important;
}

.jspec-calc-select option {
    background: #06122a !important;
    color: #ffffff !important;
    padding: 10px !important;
}

.jspec-calc-input::placeholder {
    color: #a0aec0 !important;
    opacity: 0.5 !important;
}

.jspec-calc-toggle {
    display: flex !important;
    gap: 0 !important;
    background: rgba(13, 31, 60, 0.6) !important;
    border-radius: 10px !important;
    padding: 4px !important;
    border: 1px solid rgba(138, 155, 174, 0.3) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.jspec-calc-toggle input[type="radio"] {
    display: none !important;
}

.jspec-calc-toggle label {
    flex: 1 !important;
    padding: 0.75rem 1rem !important;
    text-align: center !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    color: #a0aec0 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: all 0.25s ease !important;
}

.jspec-calc-toggle input[type="radio"]:checked+label {
    background: linear-gradient(180deg, #c0c8d0 0%, #97a0a9 20%, #6a7580 80%, #4a5560 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(151, 160, 169, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.jspec-calc-row-rates {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
}

.jspec-calc-rate {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.jspec-calc-rate label {
    font-size: 0.75rem !important;
    color: #a0aec0 !important;
}

.jspec-calc-btn {
    margin-top: 1.5rem !important;
    padding: 1.1rem 2rem !important;
    background:
        linear-gradient(135deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.8) 45%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.8) 55%, transparent 60%, transparent 100%),
        linear-gradient(135deg, transparent 0%, transparent 70%, rgba(255, 255, 255, 0.4) 75%, transparent 80%, transparent 100%),
        linear-gradient(180deg, #c8cdd3 0%, #b0b8c0 15%, #97a0a9 35%, #7a838c 60%, #5a6570 85%, #4a5560 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #333 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 20px rgba(74, 85, 96, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.jspec-calc-btn::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(135deg,
            transparent 0%,
            transparent 35%,
            rgba(255, 255, 255, 0.5) 40%,
            transparent 45%,
            transparent 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.jspec-calc-btn:hover::before {
    opacity: 1 !important;
    animation: shine-sweep 0.6s ease !important;
}

@keyframes shine-sweep {
    from {
        transform: translateX(-30%) translateY(-30%);
    }

    to {
        transform: translateX(30%) translateY(30%);
    }
}

.jspec-calc-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(74, 85, 96, 0.6), inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
}

.jspec-calc-btn:active {
    transform: translateY(0) !important;
}

.jspec-calc-btn.loading .jspec-calc-btn-text {
    opacity: 0 !important;
}

.jspec-calc-btn.loading .jspec-calc-btn-loader {
    display: block !important;
}

.jspec-calc-btn-loader {
    display: none !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 24px !important;
    height: 24px !important;
    margin: -12px 0 0 -12px !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    animation: jspec-spin 0.8s linear infinite !important;
}

@keyframes jspec-spin {
    to {
        transform: rotate(360deg);
    }
}

.jspec-calc-error {
    padding: 0.75rem 1rem !important;
    background: rgba(248, 113, 113, 0.15) !important;
    border: 1px solid #f87171 !important;
    border-radius: 8px !important;
    color: #f87171 !important;
    font-size: 0.875rem !important;
    text-align: center !important;
    animation: jspec-shake 0.4s ease !important;
}

@keyframes jspec-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.jspec-calc-results {
    margin-top: 2rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid rgba(138, 155, 174, 0.3) !important;
    position: relative !important;
    z-index: 1 !important;
}

.jspec-results-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 0 1.5rem 0 !important;
    text-align: center !important;
}

.jspec-results-grid {
    display: grid !important;
    gap: 0.75rem !important;
}

.jspec-result-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.875rem 1rem !important;
    background: rgba(13, 31, 60, 0.6) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(138, 155, 174, 0.3) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.jspec-result-label {
    font-size: 0.875rem !important;
    color: #a0aec0 !important;
}

.jspec-result-value {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.jspec-result-total {
    margin-top: 1.5rem !important;
    padding: 1.25rem 1.5rem !important;
    background: linear-gradient(135deg, #8a9bae 0%, #5a6a7a 50%, #3a4a5a 100%) !important;
    border-radius: 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: 0 8px 25px rgba(90, 106, 122, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.jspec-total-label {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.jspec-total-value {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.jspec-calc-disclaimer {
    margin-top: 1rem !important;
    font-size: 0.75rem !important;
    color: #a0aec0 !important;
    text-align: center !important;
    opacity: 0.7 !important;
}

@media (max-width: 640px) {
    .jspec-calculator {
        margin: 1rem !important;
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .jspec-calc-title {
        font-size: 1.4rem !important;
    }

    .jspec-calc-row-rates {
        grid-template-columns: 1fr !important;
    }

    .jspec-total-value {
        font-size: 1.25rem !important;
    }
}

/* ========================================
   CUSTOM REGISTRATION STYLES
   ======================================== */
/* РЎРєСЂС‹РІР°РµРј РїРѕР»Рµ Email Рё Username (Р·Р°РїРѕР»РЅСЏСЋС‚СЃСЏ Р°РІС‚РѕРјР°С‚РёС‡РµСЃРєРё) */
.woocommerce-form-register p.form-row input[type="email"],
.woocommerce-form-register p.form-row label[for="reg_email"],
.woocommerce-form-register p.form-row input[name="username"],
.woocommerce-form-register p.form-row label[for="reg_username"] {
    display: none !important;
}

/* РЈР±РёСЂР°РµРј РѕС‚СЃС‚СѓРїС‹ Сѓ СЃРєСЂС‹С‚С‹С… РїРѕР»РµР№ */
.woocommerce-form-register p.form-row:has(input[type="email"]),
.woocommerce-form-register p.form-row:has(input[name="username"]) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* HIDE USERNAME/EMAIL IN REGISTRATION */
.woocommerce-form-register input[type="email"],
.woocommerce-form-register input[name="username"],
.woocommerce-form-register label[for="reg_email"],
.woocommerce-form-register label[for="reg_username"] {
    display: none !important;
}

.woocommerce-form-register .woocommerce-form-row {
    margin-bottom: 20px;
}

/* HIDE FIELDS IN ACCOUNT DETAILS (ANKETA) */
/* 1. Hide Last Name container */
.woocommerce-EditAccountForm .woocommerce-form-row--last,
.woocommerce-EditAccountForm p:has(#account_last_name) {
    display: none !important;
}

/* 2. Hide Email container */
.woocommerce-EditAccountForm p:has(#account_email),
.woocommerce-EditAccountForm p:has(input[name="account_email"]) {
    display: none !important;
}

/* 3. Hide Password Change fieldset */
.woocommerce-EditAccountForm fieldset {
    display: none !important;
}

/* 4. Make First Name full width since Last Name is gone */
.woocommerce-EditAccountForm .woocommerce-form-row--first {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

/* ========================================
   РЎРўР˜Р›Р˜ Р¤РћР Рњ Р˜ РњРћР”РђР›РћРљ
   РўРµРїРµСЂСЊ Р·Р°РіСЂСѓР¶Р°СЋС‚СЃСЏ РёР· РѕС‚РґРµР»СЊРЅС‹С… С„Р°Р№Р»РѕРІ:
   - /assets/css/jspec-forms.css (СЃС‚РёР»Рё С„РѕСЂРј РїРѕРґР±РѕСЂР°)
   - /assets/css/jspec-modal.css (СЃС‚РёР»Рё РјРѕРґР°Р»СЊРЅРѕРіРѕ РѕРєРЅР°)
   ======================================== */

.jspec-hidden {
    display: none !important;
}
