/*
 * Calculator Impozit Auto - Stylesheet
 * 
 * Copyright (c) 2025 DELTA SPEED SOLUTIONS SRL
 * Toate drepturile rezervate.
 * 
 * Acest cod CSS este proprietatea DELTA SPEED SOLUTIONS SRL și este protejat
 * prin Legea 8/1996 privind dreptul de autor și drepturile conexe din România
 * și prin legile internaționale privind drepturile de autor.
 * 
 * Utilizarea, copierea, modificarea sau distribuirea acestui cod fără permisiunea
 * scrisă a deținătorului drepturilor de autor este strict interzisă și poate
 * duce la acțiuni legale.
 */

/* CSS Variables */
:root {
    --primary: #D80000;
    --primary-hover: #b30000;
    --primary-light: rgba(216, 0, 0, 0.1);
    --primary-border: rgba(216, 0, 0, 0.3);
    --background: #ffffff;
    --foreground: #0a0a0a;
    --muted: #fef2f2;
    --muted-foreground: #64748b;
    --border: #fecaca;
    --card: #ffffff;
    --green: #059669;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--foreground);
}

/* Demo Content */
.demo-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    max-width: 56rem;
    text-align: center;
    color: var(--foreground);
}

.container h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.info-box {
    padding: 2rem;
    border-radius: 0.75rem;
    background: var(--muted);
    border: 1px solid var(--border);
}

.info-box p {
    opacity: 0.95;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Widget Overlay */
.widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease-out;
}

.widget-overlay.hidden {
    display: none;
}

.widget-panel {
    width: 440px;
    max-height: 90vh;
    background: var(--card);
    border: 2px solid var(--primary-border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
    animation: slideIn 0.2s ease-out forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.widget-header {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    padding: 0.375rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.2);
}

.widget-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.header-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.125rem;
}

.header-subtitle a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.header-subtitle a:hover {
    opacity: 1;
}

.close-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 0.625rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: var(--muted);
    color: var(--foreground);
}

.tab-btn.active {
    background: var(--background);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Content */
.widget-content {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--foreground);
}

.form-control {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    background: var(--background);
    color: var(--foreground);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.input-wrapper {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    pointer-events: none;
}

.input-wrapper .form-control {
    padding-right: 3rem;
}

/* Checkbox */
.form-group-lux {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"]:focus {
    outline: none;
}

.checkbox-wrapper label {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Result Box */
.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    text-align: center;
}

.result-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0;
}

.result-currency {
    font-size: 1.125rem;
}

.result-details {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
}

/* Widget Info */
.widget-info {
    margin-top: 1rem;
    font-size: 0.625rem;
    text-align: center;
    color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 480px) {
    .widget-panel {
        width: calc(100vw - 2rem);
        max-width: 440px;
    }

    .container h1 {
        font-size: 2rem;
    }

    .tab-btn {
        font-size: 0.625rem;
        padding: 0.5rem 0.25rem;
        gap: 0.25rem;
    }

    .tab-btn svg {
        width: 14px;
        height: 14px;
    }
}
