/* === Base Component Styles === */
/* Plain CSS — Tailwind CDN only processes classes in HTML, not @apply in external files */

.card {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 41, 59, 0.6);
    border-radius: 1rem;
    padding: 1.25rem;
}
@media (min-width: 640px) {
    .card { padding: 1.5rem; }
}

.card-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.375rem;
}

.input {
    width: 100%;
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #e2e8f0;
    transition: all 0.15s ease;
}
.input::placeholder {
    color: #64748b;
}
.input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 110, 245, 0.4);
    border-color: rgba(76, 110, 245, 0.5);
}

select.input {
    cursor: pointer;
}

textarea.input {
    resize: vertical;
}

.color-input {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid #334155;
    background: transparent;
    padding: 2px;
    -webkit-appearance: none;
    appearance: none;
}
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-input::-moz-color-swatch { border: none; border-radius: 6px; }

/* === Buttons === */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: #4c6ef5;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-primary:hover { background-color: #4263eb; }
.btn-primary:focus { outline: none; box-shadow: 0 0 0 2px rgba(92, 124, 250, 0.4); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background-color: #1e293b;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-secondary:hover { background-color: #334155; }
.btn-secondary:focus { outline: none; box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.3); }
.btn-secondary:active { transform: scale(0.98); }

/* === Tab Buttons === */

.tab-btn {
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}
.tab-btn:hover { color: #cbd5e1; }
.tab-btn.active {
    background-color: rgba(76, 110, 245, 0.15);
    color: #748ffc;
}

/* === Content Type Buttons === */

.content-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    background-color: rgba(30, 41, 59, 0.4);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}
.content-type-btn:hover {
    color: #e2e8f0;
    border-color: #475569;
}
.content-type-btn.active {
    border-color: rgba(76, 110, 245, 0.5);
    background-color: rgba(76, 110, 245, 0.1);
    color: #748ffc;
}

/* === Style/Eye/Format/ECC Buttons === */

.style-btn, .eye-btn, .format-btn, .ecc-btn, .size-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(51, 65, 85, 0.5);
    background-color: rgba(30, 41, 59, 0.4);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}
.style-btn:hover, .eye-btn:hover, .format-btn:hover, .ecc-btn:hover, .size-preset-btn:hover {
    color: #e2e8f0;
    border-color: #475569;
}
.style-btn.active, .eye-btn.active, .format-btn.active, .ecc-btn.active, .size-preset-btn.active {
    border-color: rgba(76, 110, 245, 0.5);
    background-color: rgba(76, 110, 245, 0.1);
    color: #748ffc;
}

/* === Unit Toggle Buttons === */

.unit-btn {
    background-color: rgba(30, 41, 59, 0.6);
    color: #64748b;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.unit-btn:hover {
    color: #cbd5e1;
    background-color: rgba(51, 65, 85, 0.6);
}
.unit-btn.active {
    background-color: rgba(76, 110, 245, 0.2);
    color: #748ffc;
}

/* === Range Inputs === */

input[type="range"] {
    height: 0.5rem;
    border-radius: 9999px;
    appearance: none;
    -webkit-appearance: none;
    background: #334155;
    cursor: pointer;
    width: 100%;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background: #5c7cfa;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
input[type="range"]::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background: #5c7cfa;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* === Checkbox accent === */
input[type="checkbox"] {
    accent-color: #4c6ef5;
    width: 1rem;
    height: 1rem;
}

/* === Preview Container (checkerboard for transparent bg) === */

#qr-preview-container {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* === Scrollbar === */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* === Animations === */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel {
    animation: fadeIn 0.2s ease-out;
}

/* === Mobile tweaks === */

@media (max-width: 1024px) {
    #qr-preview-container {
        min-height: 200px;
    }
}
