/**
 * Calculadora de TDEE - Estilos Personalizados
 * @version 1.0
 * @date 2025-11-06
 * Tema: Bootswatch Vapor
 * Cor principal: #e74c3c (red/danger)
 */

/* ===== Global Styles ===== */
:root {
    --tdee-primary: #e74c3c;
    --tdee-primary-dark: #c0392b;
    --tdee-primary-light: #ec7063;
    --tdee-success: #27ae60;
    --tdee-info: #3498db;
    --tdee-warning: #f39c12;
    --tdee-danger: #e74c3c;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

/* ===== Calculator Icon ===== */
.calculator-icon {
    animation: pulse 2s ease-in-out infinite;
}

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

/* ===== Cards ===== */
.card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.card-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* ===== Form Elements ===== */
.form-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--tdee-primary);
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
    color: #fff;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-select option {
    background: #1a1a2e;
    color: #fff;
}

.input-group-text {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--tdee-primary);
    font-weight: 600;
}

/* ===== Radio Buttons (Sexo) ===== */
.btn-check:checked + .btn-outline-primary {
    background: rgba(52, 152, 219, 0.3);
    border-color: #3498db;
    color: #3498db;
}

.btn-check:checked + .btn-outline-danger {
    background: rgba(231, 76, 60, 0.3);
    border-color: var(--tdee-primary);
    color: var(--tdee-primary);
}

.btn-outline-primary,
.btn-outline-danger {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    color: #3498db;
}

.btn-outline-danger:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: var(--tdee-primary);
    color: var(--tdee-primary);
}

/* ===== Buttons ===== */
.btn-danger {
    background: linear-gradient(135deg, var(--tdee-primary) 0%, var(--tdee-primary-dark) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--tdee-primary-dark) 0%, var(--tdee-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
    color: #fff;
}

.btn-outline-secondary {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* ===== Result Boxes ===== */
.result-box {
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.result-box:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.result-box h3 {
    font-size: 2rem;
    font-weight: 700;
}

#tmbResult {
    color: var(--tdee-info);
}

#tdeeResult {
    color: var(--tdee-primary);
    font-size: 2.5rem;
}

#caloriasObjetivo {
    color: var(--tdee-success);
}

/* ===== Tables ===== */
.table {
    color: #fff;
}

.table thead {
    background: rgba(231, 76, 60, 0.2);
    border-bottom: 2px solid var(--tdee-primary);
}

.table thead th {
    color: var(--tdee-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(231, 76, 60, 0.1);
    transform: scale(1.01);
}

.table-hover tbody tr:hover {
    background: rgba(231, 76, 60, 0.15);
}

/* ===== Chart Container ===== */
#macrosChart {
    max-height: 300px;
}

/* ===== Plano Semanal ===== */
#planoSemanal {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

#planoSemanal h6 {
    color: var(--tdee-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

#planoSemanal ul {
    list-style: none;
    padding: 0;
}

#planoSemanal ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#planoSemanal ul li:last-child {
    border-bottom: none;
}

#planoSemanal ul li i {
    color: var(--tdee-primary);
    margin-right: 0.5rem;
}

/* ===== Dicas Container ===== */
#dicasContainer {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

#dicasContainer h6 {
    color: var(--tdee-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

#dicasContainer ul {
    list-style: none;
    padding: 0;
}

#dicasContainer ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#dicasContainer ul li:last-child {
    border-bottom: none;
}

#dicasContainer ul li i {
    color: var(--tdee-success);
    margin-right: 0.5rem;
}

/* ===== Accordion (FAQ) ===== */
.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.accordion-button {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 600;
    border: none;
}

.accordion-button:not(.collapsed) {
    background: rgba(231, 76, 60, 0.2);
    color: var(--tdee-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
    border-color: var(--tdee-primary);
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) saturate(100%) invert(44%) sepia(68%) saturate(2176%) hue-rotate(338deg) brightness(96%) contrast(88%);
}

.accordion-body {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.accordion-body code {
    background: rgba(231, 76, 60, 0.2);
    color: var(--tdee-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.accordion-body ul,
.accordion-body ol {
    margin-bottom: 1rem;
}

.accordion-body ul li,
.accordion-body ol li {
    margin-bottom: 0.5rem;
}

.accordion-body strong {
    color: var(--tdee-primary);
}

/* ===== Alert ===== */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: var(--tdee-info);
    color: #fff;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.2);
    border-left-color: var(--tdee-warning);
    color: #fff;
}

.alert-success {
    background: rgba(39, 174, 96, 0.2);
    border-left-color: var(--tdee-success);
    color: #fff;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.2);
    border-left-color: var(--tdee-danger);
    color: #fff;
}

/* ===== Badges ===== */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-protein {
    background: rgba(52, 152, 219, 0.3);
    color: var(--tdee-info);
}

.badge-carbs {
    background: rgba(243, 156, 18, 0.3);
    color: var(--tdee-warning);
}

.badge-fats {
    background: rgba(39, 174, 96, 0.3);
    color: var(--tdee-success);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultSection {
    animation: fadeIn 0.5s ease;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .calculator-icon i {
        font-size: 3rem !important;
    }
    
    .result-box h3 {
        font-size: 1.5rem;
    }
    
    #tdeeResult {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem !important;
    }
    
    .result-box {
        margin-bottom: 1rem;
    }
    
    .table thead th {
        font-size: 0.8rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: #fff;
    }
    
    .card {
        background: #fff;
        border: 1px solid #000;
    }
    
    .btn,
    #navbar-placeholder,
    #footer-placeholder,
    #breadcrumb-placeholder {
        display: none;
    }
    
    .table {
        color: #000;
    }
}

/* ===== Loading State ===== */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(231, 76, 60, 0.3);
    border-top-color: var(--tdee-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
