/* WorldCars Calculator Styles */

/* Variables */
:root {
    --primary-font: 'Montserrat', 'BPG Arial Caps', sans-serif;
    --secondary-font: 'Open Sans', 'BPG Arial', sans-serif;
    --blue-color: #6c98e1;
    --orange-color: #ff6b35;
    --gray-color: #757575;
    --black-color: #333333;
    --light-gray: #eceff3;
    --border-color: #d5d9df;
}

.worldcars-calculator {
    font-family: var(--secondary-font);
    color: var(--black-color);
}

.calculator {
    padding-bottom: 40px;
    font-family: var(--secondary-font);
    overflow: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
}

.calculator.calculator-wrapper {
    padding: 50px 0;
    min-height: calc(100vh - 573px);
}

.calculator-title {
    font-weight: 700;
    font-size: 36px;
    font-family: var(--primary-font);
    line-height: normal;
    color: var(--black-color);
}

.calculator-text {
    padding-bottom: 50px;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: var(--black-color);
}

.calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.calculator-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--black-color);
}

.calculator-logo {
    max-height: 64px;
    height: auto;
    width: auto;
    flex-shrink: 0;
}

.calculator-text p {
    margin: 0;
    color: var(--gray-color);
}

.calc {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calculator-block {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.calculator-block .calculator-block-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.calculator-block.loading .calculator-block-wrapper {
    opacity: 0.6;
}

.calculator-block.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.calculator-block .grid-title {
    color: var(--gray-color);
    font-weight: 600;
    font-family: var(--primary-font);
    height: 30px;
    line-height: 24px;
    overflow: hidden;
    font-size: 16px;
    margin-bottom: 15px;
}

.calculator-block .grid-title img {
    width: 24px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Card header icons */
.calculator-card-header .calculator-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 107, 53, 0.05) 100%);
    color: var(--orange-color);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 53, 0.25);
}

.calculator-card-header .calculator-card-icon svg {
    width: 22px;
    height: 22px;
}

.calculator-card-header h3 {
    margin: 0;
}

/* Total price icon */
.calculator-total-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.calculator-total-icon svg {
    width: 20px;
    height: 20px;
}

.calculator-field-wrapper {
    position: relative;
}

.calculator-field-wrapper .calculator-field-icon-inline {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--orange-color);
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.calculator-field-wrapper .calculator-field-icon-inline svg {
    width: 100%;
    height: 100%;
}

.calculator-field-wrapper select {
    padding: 8px 30px 8px 44px !important;
}

.calculator-field-wrapper input {
    padding-left: 48px !important;
}

.calculator-field-wrapper .select2-container {
    width: 100% !important;
}

.calculator-field-wrapper .select2-container--default .select2-selection--single {
    padding: 8px 30px 8px 44px !important;
    height: auto;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
}

.calculator-field-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 14px;
    color: var(--black-color);
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.calculator-field-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 14px;
    height: 100%;
}

/* Select Styles */
.select {
    position: relative;
    margin-bottom: 0;
}

.select select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: var(--black-color);
    appearance: none;
    cursor: pointer;
}

.select select:focus {
    outline: none;
    border-color: var(--blue-color);
}

.select select:disabled {
    background-color: var(--light-gray);
    color: var(--gray-color);
    cursor: not-allowed;
}

/* Input Styles */
.input-element {
    margin-bottom: 0;
}

.input-element input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: var(--black-color);
}

.input-element input:focus {
    outline: none;
    border-color: var(--blue-color);
}

/* Icons Block */
.icons-block {
    height: 42px;
    text-align: center;
    margin-bottom: 0;
}

.choose-icons {
    display: inline-block;
    margin: 0 10px;
    border: 1px solid var(--blue-color);
    outline: none;
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.choose-icons:hover {
    transition: 0.5s;
    border: 1px solid var(--orange-color);
}

.choose-icons:hover .icon-name {
    opacity: 1;
    visibility: visible;
}

.choose-icons:hover .wheel,
.choose-icons:hover .battery {
    stroke: var(--orange-color);
    transition: 0.5s;
}

.choose-icons:hover .battery-line {
    fill: var(--orange-color);
    transition: 0.5s;
}

.choose-icons.active {
    border: 1px solid var(--orange-color);
    background-color: rgba(255, 107, 53, 0.1);
}

.choose-icons.active .wheel,
.choose-icons.active .battery {
    stroke: var(--orange-color);
}

.choose-icons.active .battery-line {
    fill: var(--orange-color);
}

.icon-name {
    position: absolute;
    left: -10px;
    top: 120%;
    opacity: 0;
    visibility: hidden;
    background: #fff;
    color: var(--gray-color);
    border: 1px solid var(--orange-color);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 8px;
    transition: all 0.4s ease 0s;
    z-index: 9;
    white-space: nowrap;
}

.icons {
    margin: 0;
    padding: 5px 10px 2px;
    color: var(--orange-color);
    font-size: 16px;
}

/* Calculator Table */
.calculator-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.calculator-table tr {
    border-bottom: 1px solid var(--border-color);
}

.calculator-table tr.red-bg {
    background-color: rgba(255, 107, 53, 0.1);
}

.calculator-table td {
    padding: 12px 8px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.calculator-table td.name {
    font-weight: 500;
    color: var(--black-color);
}

.calculator-table td.price {
    font-weight: 600;
    color: var(--orange-color);
    text-align: right;
    min-width: 80px;
}

.calculator-table td.text {
    font-weight: 600;
    color: var(--black-color);
}

.calculator-table td.toggle-button {
    text-align: center;
    width: 60px;
}

/* Toggle Styles */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .b {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.toggle .b:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle input:checked + .b {
    background-color: var(--orange-color);
}

.toggle input:checked + .b:before {
    transform: translateX(20px);
}

/* Total Price Section */
.total-price-wrapper {
    margin-top: 30px;
}

.calculated-fee-wrapper {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--orange-color);
}

.calculated-fee {
    text-align: center;
}

.total-icon img {
    width: 32px;
    height: 32px;
}

.total-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--black-color);
}

.total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--orange-color);
}

/* Contact Info */
.calculator-contact-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
    text-align: center;
}

.calculator-contact-info p {
    margin-bottom: 10px;
    color: var(--gray-color);
}

/* Bootstrap Grid Support */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    gap: 5px;
    align-items: stretch;
}

.col-md-3,
.col-md-6,
.col-md-12,
.col-sm-6,
.col-sm-12,
.col-xs-12 {
    padding: 0 15px;
    flex: 1;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* კალკულატორის კასტომ ზომები */
.col-calc-20 {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 0 15px;
}

.col-calc-25 {
    flex: 0 0 calc(25% - 5px);
    max-width: calc(25% - 5px);
    padding: 0 15px;
}

.addon-services-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.addon-services-column .addon-services-card,
.addon-services-column .total-cost-card {
    width: 100%;
}


/* Responsive */

/* ტაბლეტი (768px - 1024px) - 2 დივი ერთ ზოლზე */
@media (min-width: 769px) and (max-width: 1024px) {
    .col-calc-25 {
        flex: 0 0 calc(50% - 3px);
        max-width: calc(50% - 3px);
    }
}

/* ტელეფონი (768px-ის ქვემოთ) - 1 დივი ერთ ზოლზე */
@media (max-width: 768px) {
    .calculator-title {
        font-size: 24px;
    }

    .calculator-text {
        padding-bottom: 30px;
    }

    .calculator-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .calculator-logo {
        max-height: 48px;
    }

    .calculator-block {
        margin-bottom: 30px;
    }

    .choose-icons {
        margin: 5px;
    }

    .col-md-3,
    .col-md-6,
    .col-calc-20,
    .col-calc-25 {
        flex: 0 0 100%;
        max-width: 100%;
    }

}

/* ========================================
   Select2 Custom Styling
   ======================================== */

/* Select2 Container */
.select2-container {
    font-family: var(--secondary-font);
}

.select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    padding: 8px 30px 8px 12px !important;
    background-color: white !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #ff6b35 !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #ff6b35 !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1) !important;
    outline: none !important;
}

/* Select2 Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #9ca3af transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
    margin-left: -5px !important;
    margin-top: -3px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #9ca3af transparent !important;
    border-width: 0 5px 6px 5px !important;
}

/* Select2 Rendered Text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
    padding-left: 0 !important;
    color: #1f2937 !important;
    font-size: 15px !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9ca3af !important;
}

/* Select2 Dropdown */
.select2-container--default .select2-dropdown {
    border: 2px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    margin-top: 4px !important;
}

/* Search Box */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #ff6b35 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1) !important;
}

/* Results List */
.select2-container--default .select2-results__option {
    padding: 10px 12px !important;
    font-size: 14px !important;
    transition: all 0.15s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #fff5f0 !important;
    color: #ff6b35 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #ff6b35 !important;
    color: white !important;
}

/* Disabled State */
.select2-container--default .select2-selection--single[aria-disabled=true] {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    border-color: #e5e7eb !important;
}

/* Loading State */
.select2-container--default .select2-results__option[aria-disabled=true] {
    color: #9ca3af !important;
}

/* No Results */
.select2-container--default .select2-results__option--disabled {
    color: #9ca3af !important;
    padding: 10px 12px !important;
}

/* Clear Button (if enabled) */
.select2-container--default .select2-selection--single .select2-selection__clear {
    color: #9ca3af !important;
    font-size: 20px !important;
    font-weight: bold !important;
    margin-right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #ff6b35 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        height: 44px !important;
        font-size: 14px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px !important;
    }

    .select2-container--default .select2-results__option {
        padding: 12px !important;
        font-size: 14px !important;
    }
}

/* Animation */
.select2-container--default.select2-container--open .select2-dropdown {
    animation: selectDropdown 0.2s ease;
}

@keyframes selectDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
