/* #5D4E9D */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.container.visible {
    opacity: 1;
}

.header {
    background-color: #482e8e;
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.clear-btn,
.clear-btn-ai {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.calculator-form {
    background: white;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.color-options {
    display: flex;
    gap: 15px;
}

.color-option {
    flex: 1;
}

.color-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.color-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    gap: 8px;
    font-size: 0.9rem;
}

input[type="radio"] {
    display: none;
}

input[type="radio"]:checked+.color-label {
    background-color: #f0f0f0;
    border-color: #482e8e;
}

.slider-container {
    position: relative;
}

.slider {
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #482e8e;
    border-radius: 50%;
    cursor: pointer;
}

.slider-value {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

.experience-options {
    display: flex;
    gap: 15px;
}

.experience-option {
    position: relative;
    flex: 1;
}

.experience-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.experience-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    gap: 4px;
    font-size: 0.9rem;
    height: 100%;
    min-height: 52px;
}

.exp-title {
    font-weight: normal;
    font-size: 0.9rem;
}

.exp-years {
    font-size: 0.9rem;
    color: #666;
    margin-left: 0;
}

.experience-option input[type="radio"]:checked+.experience-label {
    background-color: #f0f0f0;
    border-color: #482e8e;
}

.experience-option input[type="radio"]:hover+.experience-label {
    border-color: #482e8e;
}

.price-display,
.ai-price-display {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
}

.price-display h2,
.ai-price-display h2 {
    color: #482e8e;
    font-size: 1.3rem;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 15px;
    }

    h1 {
        font-size: 1.2rem;
    }

    .clear-btn,
    .clear-btn-ai {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .calculator-form {
        padding: 15px;
    }

    .color-options {
        flex-direction: column;
    }

    .experience-options {
        flex-direction: column;
    }

    .experience-btn {
        flex: 100%;
    }

    .price-display h2,
    .ai-price-display h2 {
        font-size: 1.1rem;
    }
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #482e8e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 1.2rem;
}

/* Celtic loader styles */
.celtic-loader {
    width: 80px;
    height: 80px;
}

.celtic-loader svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    animation: rotate 2s linear infinite;
}

.spiral {
    fill: none;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transform-origin: center;
    animation: draw 3s ease-in-out infinite;
}

@keyframes draw {
    0% {
        stroke-dashoffset: 400;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -400;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Remove old styles */
.spinner,
.tattoo-loader {
    display: none;
}

optgroup {
    font-weight: 600;
    color: #482e8e;
    font-size: 0.9rem;
    padding: 8px 8px;
    width: 100%;
}

optgroup option {
    font-weight: normal;
    color: #666;
    padding: 8px 24px;
    width: 100%;
}

/* For Firefox */
@-moz-document url-prefix() {
    select {
        padding-right: 40px;
    }

    optgroup {
        padding: 8px 8px;
    }

    option {
        padding: 8px 24px;
    }
}

/* For Chrome/Safari */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select {
        padding-right: 40px;
    }

    optgroup {
        padding: 8px 8px;
    }

    option {
        padding: 8px 24px;
    }
}

/* Remove all max-width constraints */
.form-group select,
.form-group select optgroup,
.form-group select option {
    max-width: none;
    min-width: none;
    width: 100%;
}

.not-available-message {
    text-align: center;
    color: red;
    font-size: 0.8rem;
    margin-top: 5px;
}

.exp-status {
    color: red;
}

#sizeTooltip {
    font-size: 0.8rem;
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* <svg viewBox="0 0 100 100">
                <path class="spiral" d="
                    M 50 50
                    m 0 -20
                    a 20 20 0 1 0 0.1 0
                    m 0 -10
                    a 30 30 0 1 1 -0.1 0
                    m 0 -10
                    a 40 40 0 1 0 0.1 0
                " />
            </svg> */