/* CSS EXATO - Copiado do projeto Next.js original */

/* Layout principal - EXATO do original */
.consulta-placa-widget {
    min-height: 100vh;
    background: linear-gradient(to bottom, #dbeafe, #bfdbfe);
    padding: 2.5rem 1rem;
}

.consulta-placa-widget .max-w-4xl {
    max-width: 56rem;
    margin: 0 auto;
}

/* Título - EXATO do original */
.consulta-placa-widget h1 {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    color: #1e40af;
    margin-bottom: 2rem;
}

/* Card principal - EXATO do original */
.card {
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    background: white;
    overflow: hidden;
}

.card-header {
    background: #dbeafe;
    border-bottom: 1px solid #bfdbfe;
    padding: 1rem 1.5rem;
}

.card-title {
    color: #1e40af;
    font-weight: 600;
}

.card-content {
    padding: 1.5rem;
}

/* Container central - EXATO do original */
.flex-center-column {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.toggle-section {
    width: 100%;
    max-width: 28rem;
    margin-bottom: 2rem;
}

/* Toggle container - EXATO do original */
.toggle-container {
    background: #e5e7eb;
    border-radius: 9999px;
    padding: 0.25rem;
    display: flex;
    position: relative;
}

/* Indicador do toggle - EXATO do original */
.toggle-indicator {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    border-radius: 9999px;
    background: #2563eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Botões do toggle - EXATO do original */
.toggle-button {
    flex: 1;
    padding: 0.5rem;
    border-radius: 9999px;
    text-align: center;
    z-index: 10;
    position: relative;
    font-weight: 500;
    user-select: none;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.3s ease;
}

.toggle-button:focus {
    outline: none;
}

.toggle-button:active {
    transform: scale(0.97);
}

/* Container das placas - EXATO do original */
.plate-container {
    width: 100%;
    max-width: 28rem;
    height: 180px;
    position: relative;
    margin-bottom: 2rem;
    perspective: 1000px;
}

.plate-flip {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

/* Placa Antiga - EXATO do componente original */
.plate-front,
.plate-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.plate-back {
    transform: rotateY(180deg);
}

.plate-card {
    border: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Placa Antiga - EXATO */
.placa-antiga-form {
    width: 100%;
}

.placa-antiga-container {
    background: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 4px solid #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.placa-antiga-header {
    background: #d1d5db;
    padding: 0.5rem;
    text-align: center;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
}

.placa-antiga-content {
    background: #e5e7eb;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input da placa antiga - EXATO do original */
.placa-antiga-input {
    text-align: center !important;
    font-weight: 700 !important;
    background: #e5e7eb !important;
    border: 0 !important;
    color: black !important;
    height: 4rem !important;
    letter-spacing: 0.15em !important;
    font-size: clamp(28px, 8vw, 48px) !important;
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: uppercase !important;
    font-family: inherit !important;
    line-height: normal !important;
}

@media (min-width: 768px) {
    .placa-antiga-input {
        height: 5rem !important;
        font-size: clamp(32px, 8vw, 52px) !important;
    }
}

.placa-antiga-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
    ring: 0;
}

/* Placa Mercosul - EXATO */
.placa-mercosul-form {
    width: 100%;
}

.placa-mercosul-container {
    background: #1e40af;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.placa-mercosul-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
}

.mercosul-label {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.brasil-label {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
}

.brasil-flag {
    width: 2rem;
    height: 1.25rem;
    background: #22c55e;
    border-radius: 0.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fbbf24;
}

.brasil-flag-inner {
    width: 1.25rem;
    height: 0.75rem;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brasil-flag-center {
    width: 0.75rem;
    height: 0.25rem;
    background: #1e40af;
    border-radius: 50%;
}

.placa-mercosul-content {
    background: white;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input da placa Mercosul - EXATO do original */
.placa-mercosul-input {
    text-align: center !important;
    font-weight: 700 !important;
    background: white !important;
    border: 0 !important;
    color: black !important;
    height: 4rem !important;
    letter-spacing: 0.15em !important;
    font-size: clamp(28px, 8vw, 48px) !important;
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: uppercase !important;
    font-family: inherit !important;
    line-height: normal !important;
}

@media (min-width: 768px) {
    .placa-mercosul-input {
        height: 5rem !important;
        font-size: clamp(32px, 8vw, 52px) !important;
    }
}

.placa-mercosul-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
    ring: 0;
}

/* Botões - EXATO do original */
.btn-consultar {
    margin-top: 1rem;
    background: #2563eb;
    color: white;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-consultar:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-consultar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading section - EXATO do original */
.loading-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
}

.loading-icon {
    height: 2.5rem;
    width: 2.5rem;
    color: #2563eb;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

.loading-text {
    color: #2563eb;
}

/* Error section - EXATO do original */
.error-section {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

/* Results - EXATO como VehicleInfo component */
.resultado-placa {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-top: 1.5rem;
    padding: 0;
}

/* Space-y utility - EXATO do original */
.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Borders - EXATO do original */
.border-blue-200 {
    border-color: #bfdbfe;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.border-red-200 {
    border-color: #fecaca;
}

.border-blue-100 {
    border-color: #dbeafe;
}

.border-green-100 {
    border-color: #dcfce7;
}

/* Backgrounds - EXATO do original */
.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

/* Text colors - EXATO do original */
.text-blue-800 {
    color: #1e40af;
}

.text-green-800 {
    color: #166534;
}

.text-green-700 {
    color: #15803d;
}

.text-red-800 {
    color: #991b1b;
}

.text-red-700 {
    color: #b91c1c;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-green-500 {
    color: #10b981;
}

.text-red-500 {
    color: #ef4444;
}

.text-gray-500 {
    color: #6b7280;
}

/* Grid layout - EXATO do original */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

/* Flex utilities - EXATO do original */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* Typography - EXATO do original */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Spacing - EXATO do original */
.mr-2 {
    margin-right: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

/* Border radius - EXATO do original */
.rounded-md {
    border-radius: 0.375rem;
}

/* Badge styles - EXATO do original */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-destructive {
    background-color: #fecaca;
    color: #991b1b;
}

/* Height utilities - EXATO do original */
.h-5 {
    height: 1.25rem;
}

.w-5 {
    width: 1.25rem;
}

/* Tabs styling - EXATO do original */
.tabs-container {
    width: 100%;
}

.tabs-list {
    display: grid;
    padding: 0.25rem;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.tab-trigger {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.tab-trigger.active {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Text alignment - EXATO do original */
.text-center {
    text-align: center;
}

/* Responsividade - EXATO do original */
@media (max-width: 768px) {
    .consulta-placa-widget {
        padding: 1.5rem 1rem;
    }
    
    .plate-container {
        height: 150px;
    }
    
    .placa-antiga-input,
    .placa-mercosul-input {
        height: 3rem;
        font-size: clamp(22px, 6vw, 36px);
    }
    
    .consulta-placa-widget h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}