/* Custom CSS for Briefing Online */

/* Font Family */
body {
    font-family: 'Inter', sans-serif;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.form-step.active {
    display: block;
}

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

/* Upload Areas */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #f9fafb;
}

.upload-area:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.upload-area.dragover {
    border-color: #3b82f6;
    background-color: #dbeafe;
    transform: scale(1.02);
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.upload-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.upload-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.upload-item .file-info {
    padding: 0.5rem 0;
    text-align: center;
}

.upload-item .file-name {
    font-size: 0.75rem;
    color: #374151;
    word-break: break-all;
    margin-bottom: 0.25rem;
}

.upload-item .file-size {
    font-size: 0.625rem;
    color: #6b7280;
}

.upload-item .remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.upload-item .remove-file:hover {
    background: #dc2626;
}

/* Progress Bar Animation */
#progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Button Hover Effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Form Input Focus Effects */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tooltip Styles */
#tooltip {
    max-width: 200px;
    z-index: 9999;
}

/* Product Item Styles */
.produto-item {
    transition: all 0.3s ease;
}

.produto-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Success Message Animation */
#success-message {
    animation: slideInUp 0.5s ease-out;
}

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

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .upload-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .form-step h2 {
        font-size: 1.5rem;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Validation Styles */
.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 0.25rem;
}

/* Success Styles */
.field-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Header Logo Placeholder */
#header-logo {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

#header-logo::before {
    content: 'LOGO';
}

/* Floating Support Button Animation */
.fixed.bottom-6.right-6 a {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Form Section Headers */
.form-step h2 i {
    display: inline-block;
    width: 1.5rem;
    text-align: center;
}

/* Example Button Styles */
button[onclick^="insertExample"] {
    transition: all 0.2s ease;
}

button[onclick^="insertExample"]:hover {
    background-color: #dbeafe;
    transform: scale(1.05);
}

/* File Input Styling */
input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Drag and Drop Visual Feedback */
.upload-area.drag-active {
    border-color: #10b981;
    background-color: #d1fae5;
}

/* Progress Percentage Animation */
#progress-percentage {
    transition: all 0.3s ease;
}

/* Step Navigation Breadcrumb */
.step-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.step-breadcrumb .step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.step-breadcrumb .step.active {
    background-color: #3b82f6;
    color: white;
}

.step-breadcrumb .step.completed {
    background-color: #10b981;
    color: white;
}

/* Smooth Transitions */
* {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Print Styles */
@media print {
    .fixed, .sticky, #tooltip {
        display: none !important;
    }
    
    .form-step {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .upload-area {
        border: 1px solid #ccc;
        background: white;
    }
}


/* Estilos específicos para o rodapé com nova logo */
footer .logo-footer {
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

footer .logo-footer:hover {
    transform: scale(1.05);
}

/* Estilos para os campos de domínio */
.domain-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.domain-radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.domain-radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.domain-radio-group label:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.domain-radio-group input[type="radio"] {
    margin-right: 8px;
    accent-color: #3b82f6;
}

/* Estilos para múltiplos produtos */
.produto-item {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.produto-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.remove-produto {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.remove-produto:hover {
    opacity: 1;
    transform: scale(1.1);
    background: #dc2626;
}

/* Animação para novos produtos adicionados */
.produto-item.new-product {
    animation: slideInUp 0.5s ease-out;
}

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

/* Estilos para campos de CEP com loading */
.cep-loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Melhorias nos ícones sociais do rodapé */
footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

footer .social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsividade aprimorada para o rodapé */
@media (max-width: 768px) {
    footer .grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    footer .logo-footer {
        margin: 0 auto;
    }
    
    .domain-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .produto-item {
        margin-bottom: 20px;
    }
}

/* Estilos para campos readonly (preenchidos automaticamente) */
input[readonly] {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

input[readonly]:focus {
    ring-color: #9ca3af;
    border-color: #9ca3af;
}

/* Indicador visual para campos preenchidos automaticamente */
.auto-filled {
    position: relative;
}

.auto-filled::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
}

/* Melhorias na acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Estilos para focus melhorado */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animações suaves para transições de etapas */
.form-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-step.entering {
    opacity: 0;
    transform: translateX(20px);
}

.form-step.active {
    opacity: 1;
    transform: translateX(0);
}

.form-step.leaving {
    opacity: 0;
    transform: translateX(-20px);
}

