/**
 * Ark Paint Configurator - Frontend Styles
 */


form.cart.ark-paint-form, .ark-toggle-buttons {
    font-family: "Figtree", Sans-serif;
}

.ark-paint-configurator { max-width: 100%; margin-bottom: 20px; width: 100%; }
.ark-paint-form { width: 100%; }


.ark-paint-configurator button.ark-add-to-cart,
.ark-paint-configurator .single_add_to_cart_button,
button.ark-add-to-cart.single_add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    padding: 20px 24px !important;
    background-color: #6267AF !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    border-radius: 25px !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    float: none !important;
    font-family: "Figtree", Sans-serif !important;
    text-transform: none !important;
}

.ark-paint-configurator button.ark-add-to-cart:hover,
button.ark-add-to-cart.single_add_to_cart_button:hover {
    background-color: #5558a1 !important;
}

.ark-paint-configurator button.ark-add-to-cart.loading,
.ark-paint-configurator button.ark-add-to-cart.added {
    background-color: #4a5568 !important;
    color: white !important;
}

.ark-paint-configurator button.ark-add-to-cart.added {
    background-color: #48bb78 !important;
}

.ark-btn-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: ark-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes ark-spin {
    to { transform: rotate(360deg); }
}

button.ark-add-to-cart svg {
    vertical-align: middle;
    margin-right: 8px;
}


/* Mode Toggle */
button.ark-toggle-btn {
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    color: black;
}
.ark-mode-toggle { margin-bottom: 24px; width: 100%; }
.ark-mode-toggle .ark-label { display: block; font-size: 16px; color: #6b7280; margin-bottom: 12px; font-family: "Figtree", Sans-serif; font-weight: 400; }
.ark-toggle-buttons { display: flex;  overflow: hidden; width: 100%; }
.ark-toggle-btn { font-family: "Figtree", Sans-serif !important; flex: 1; padding: 16px 24px; background: #fff; border: none; font-size: 16px; font-weight: 400; color: #6b7280; cursor: pointer; transition: all 0.2s; }
.ark-toggle-btn:first-child { border-right: 1px solid #e0e0e0; }
.ark-toggle-btn.active { background: #f5f5f8; border-color: #4a5568; color: #1a1a1a; border-radius: 8px;}
.ark-toggle-btn:hover:not(.active) { background: #fafafa; }

/* Sections */
.ark-section { display: none; width: 100%; }
.ark-section.active { display: block; }

/* Selector Header */
.ark-selector-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; width: 100%; }
.ark-type-selector, .ark-amount-selector, .ark-sample-selector { width: 100%; }
.ark-selector-header .ark-label { font-size: 14px; font-weight: 400; color: #6b7280; font-family: "Figtree", Sans-serif; text-transform: none; }
.ark-explore-link { font-size: 14px; color: #6267AF; text-decoration: underline; font-style: normal; }
.ark-explore-link:hover { text-decoration: underline; }

/* Dropdown */
.ark-dropdown { position: relative; margin-bottom: 20px; }
.ark-dropdown-selected { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #fff; border: 2px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: border-color 0.2s; }
.ark-dropdown.open .ark-dropdown-selected, .ark-dropdown-selected:hover { border-color: #4a5568; }
.ark-selected-content { display: flex; align-items: center; gap: 12px; flex: 1; }
.ark-type-label { margin-left: auto; }
.ark-dropdown-arrow { width: 12px; height: 12px; border-right: 2px solid #666; border-bottom: 2px solid #666; transform: rotate(45deg); transition: transform 0.2s; margin-left: 12px; }
.ark-dropdown.open .ark-dropdown-arrow { transform: rotate(-135deg); }
.ark-dropdown-options { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 2px solid #4a5568; border-top: none; border-radius: 0 0 8px 8px; z-index: 100; max-height: 300px; overflow-y: auto; }
.ark-dropdown.open .ark-dropdown-options { display: block; }
.ark-dropdown.open .ark-dropdown-selected { border-radius: 8px 8px 0 0; border-bottom-color: transparent; }
.ark-dropdown-option { display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; transition: background-color 0.2s; border-bottom: 1px solid #f0f0f0; }
.ark-dropdown-option .ark-sample-label { margin-left: auto; }
.ark-dropdown-option:last-child { border-bottom: none; }
.ark-dropdown-option:hover { background: #f9f9fb; }
.ark-dropdown-option.selected { background: #f5f5f8; }

/* Type Info */
.ark-type-info, .ark-amount-info, .ark-sample-info { display: flex; flex-direction: column; gap: 2px; }
.ark-type-name, .ark-amount-volume, .ark-sample-name { font-size: 16px; font-weight: 400; color: #1a1a1a; font-family: "Figtree", Sans-serif; }
.ark-type-finish, .ark-amount-details, .ark-sample-details { font-size: 14px; color: #6b7280; font-family: "Figtree", Sans-serif; font-weight: 400; }
.ark-type-label, .ark-sample-label { display: inline-block; padding: 4px 12px; background: #E1DFF0; border: 1px solid #6267AF; border-radius: 4px; font-size: 11px; font-weight: 400; color: #4a5568; text-transform: none; letter-spacing: 0; font-family: "Figtree", Sans-serif; }
.ark-sample-label { border-color: #22c55e; color: #22c55e; }

/* Amount/Sample Row */
.ark-amount-row, .ark-sample-row { display: flex; gap: 12px; align-items: center; width: 100%; }
.ark-amount-dropdown, .ark-sample-dropdown { flex: 1; min-width: 0; }
.ark-amount-icon, .ark-sample-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: #8b8fa8; flex-shrink: 0; }
.ark-amount-icon img, .ark-sample-icon img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.ark-price-per-liter { display: inline-block; padding: 4px 12px; background: #fff; border: 1px solid #22c55e; border-radius: 4px; font-size: 13px; font-weight: 400; color: #22c55e; margin-left: auto; font-family: "Figtree", Sans-serif; }

/* Quantity Selector */
.ark-quantity-selector { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.ark-qty-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: #4a5568; padding: 0; transition: color 0.2s; }
.ark-qty-btn:hover { color: #1a1a1a; }
.ark-qty-input { width: 40px; text-align: center; font-size: 18px; font-weight: 500; border: none; background: transparent; color: #1a1a1a; -moz-appearance: textfield; appearance: textfield; }
.ark-qty-input::-webkit-outer-spin-button, .ark-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Summary */
.ark-summary { margin-bottom: 20px; width: 100%; }
.ark-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.ark-summary-label { font-size: 14px; font-weight: 400; color: #6b7280; text-transform: none; letter-spacing: 0; font-family: "Figtree", Sans-serif; }
.ark-summary-value { font-size: 14px; color: #6b7280; font-family: "Figtree", Sans-serif; font-weight: 400; }
.ark-coverage-value { color: #1a1a1a; font-weight: 700; font-family: "Figtree", Sans-serif; }
strong.ark-coverage-value { font-weight: 700; color: #2C316B;  }

/* Add to Cart Button (additional styles) */
.ark-btn-separator { opacity: 0.6; }
.ark-btn-price { font-weight: 600; }

/* Responsive */
@media (max-width: 600px) {
    .ark-amount-row, .ark-sample-row { flex-direction: column; }
    .ark-quantity-selector { align-self: flex-end; }
}

/* Modal */
.ark-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; align-items: center; justify-content: center; }
.ark-modal.open { display: flex; }
body.ark-modal-open { overflow: hidden; }
.ark-modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); }
.ark-modal-container { position: relative; width: 100%; max-width: 560px; max-height: 90vh; background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; margin: 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.ark-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 16px; border-bottom: 1px solid #f0f0f0; }
.ark-modal-title { font-size: 20px; font-weight: 600; color: #1a1a1a; margin: 0; }
.ark-modal-close { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #f5f5f8; border: none; border-radius: 50%; cursor: pointer; color: #666; transition: all 0.2s; }
.ark-modal-close:hover { background: #e5e5e8; color: #333; }
.ark-modal-body { padding: 16px 24px 24px; overflow-y: auto; }

/* Modal Cards */
.ark-modal-card { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; }
.ark-modal-card:last-child { margin-bottom: 0; }
.ark-modal-card:hover { border-color: #4a5568; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.ark-modal-card-content { flex: 1; padding-right: 16px; }
.ark-modal-card-title { font-size: 18px; font-weight: 600; color: #4a5568; margin: 0 0 4px; }
.ark-modal-card-subtitle { font-size: 13px; color: #888; margin: 0 0 12px; }
.ark-modal-card-description { font-size: 14px; color: #555; line-height: 1.5; margin: 0 0 12px; }
.ark-learn-more { color: #4a5568; font-weight: 500; text-decoration: underline; }
.ark-learn-more:hover { color: #333; }

/* Modal Rating */
.ark-modal-card-rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ark-stars { display: flex; gap: 2px; }
.ark-rating-score { font-size: 14px; font-weight: 600; color: #333; }
.ark-reviews-count { font-size: 13px; color: #4a5568; text-decoration: none; }
.ark-reviews-count:hover { text-decoration: underline; }

/* Modal Card Icon */
.ark-modal-card-icon { width: 56px; height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ark-modal-card-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Modal Responsive */
@media (max-width: 600px) {
    .ark-modal-container { margin: 10px; max-height: calc(100vh - 20px); border-radius: 12px; }
    .ark-modal-header { padding: 16px 16px 12px; }
    .ark-modal-body { padding: 12px 16px 16px; }
    .ark-modal-card { padding: 16px; }
    .ark-modal-card-title { font-size: 16px; }
}

/* Quick Calculator Modal */
.ark-calculator-modal { z-index: 999999 !important; }
.ark-calculator-modal .ark-modal-overlay { z-index: 999998 !important; background: rgba(0, 0, 0, 0.5); }
.ark-calculator-modal .ark-calculator-container { max-width: 600px; border-radius: 0; max-height: calc(100vh - 120px); height: calc(100vh - 120px); margin: 0; margin-left: auto; margin-top: 120px; display: flex; flex-direction: column; z-index: 999999 !important; position: relative; }
.ark-calculator-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #4a5568; color: #fff; }
.ark-calculator-title { display: flex; align-items: center; gap: 8px; }
.ark-calculator-title h2 { font-size: 20px; font-weight: 600; margin: 0; color: #fff; }
.ark-calculator-help { background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; padding: 0; display: flex; }
.ark-calculator-help:hover { color: #fff; }
.ark-calculator-close { display: flex; align-items: center; gap: 8px; background: none; border: none; color: #fff; cursor: pointer; font-size: 14px; }
.ark-calculator-close:hover { opacity: 0.8; }

.ark-calculator-summary { background: #4a5568; padding: 0 20px 20px; }
.ark-calculator-result { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.ark-calculator-result:last-child { border-bottom: none; }
.ark-result-label { font-size: 14px; color: rgba(255,255,255,0.8); }
.ark-result-value { font-size: 14px; font-weight: 500; color: #fff; }
.ark-coats-selector select { background: transparent; border: none; color: #fff; font-size: 14px; cursor: pointer; padding-right: 16px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.ark-coats-selector select option { color: #333; }

.ark-calculator-body { flex: 1; padding: 20px; overflow-y: auto; background: #f5f5f8; }
.ark-calculator-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.ark-calculator-card { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.ark-calculator-card:hover { border-color: #4a5568; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.ark-card-content h3 { font-size: 16px; font-weight: 500; color: #1a1a1a; margin: 0 0 4px; }
.ark-card-content p { font-size: 13px; color: #888; margin: 0; }
.ark-card-add-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: none; color: #4a5568; cursor: pointer; }

.ark-calculator-items { display: flex; flex-direction: column; gap: 12px; }
.ark-calculator-item { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 16px; }
.ark-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ark-item-title { font-size: 14px; font-weight: 600; color: #4a5568; text-transform: uppercase; letter-spacing: 0.5px; }
.ark-item-remove { background: none; border: none; color: #999; cursor: pointer; padding: 0; }
.ark-item-remove:hover { color: #dc3232; }
.ark-item-fields { display: flex; gap: 12px; margin-bottom: 12px; }
.ark-field-group { flex: 1; }
.ark-field-group label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.ark-input-unit { display: flex; align-items: center; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
.ark-input-unit input { flex: 1; border: none; padding: 10px 12px; font-size: 14px; width: 100%; }
.ark-input-unit input:focus { outline: none; }
.ark-input-unit span { padding: 10px 12px; background: #f5f5f8; color: #666; font-size: 14px; border-left: 1px solid #e0e0e0; }
.ark-item-result { text-align: right; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.ark-item-area { font-size: 16px; font-weight: 600; color: #4a5568; }

.ark-calculator-footer { padding: 16px 20px; background: #fff; border-top: 1px solid #e0e0e0; }
.ark-calculator-tip { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f9f9fb; border-radius: 8px; }
.ark-tip-icon { flex-shrink: 0; }
.ark-calculator-tip p { flex: 1; font-size: 13px; color: #666; margin: 0; }
.ark-tip-close { background: none; border: none; color: #999; cursor: pointer; padding: 0; }
.ark-calculator-tip.hidden { display: none; }

.ark-calculator-actions { padding: 16px 20px; background: #fff; }
.ark-calculator-apply-btn { width: 100%; padding: 16px; background: #4a5568; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; color: #fff; cursor: pointer; transition: background 0.2s; }
.ark-calculator-apply-btn:hover { background: #3a4558; }

@media (max-width: 600px) {
    .ark-calculator-modal .ark-calculator-container { max-width: 100%; }
    .ark-calculator-cards { grid-template-columns: 1fr; }
    .ark-item-fields { flex-wrap: wrap; }
    .ark-field-group { min-width: calc(50% - 6px); }
}
