/* ============================================
   VARIÁVEIS E RESET
   ============================================ */
:root {
    --primary-color: #1e7e34;
    --primary-dark: #155a27;
    --primary-light: #2ecc71;
    --secondary-color: #f39c12;
    --secondary-light: #f1c40f;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --border-color: #ecf0f1;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;
}

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

html, body {
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-light) 0%, #f0f3f4 100%);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    flex-shrink: 0;
}

.logo-img {
    height: 50px;
    width: auto;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    width: 33.33%;
    transition: var(--transition);
    border-radius: 10px;
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ============================================
   FORM CONTAINER
   ============================================ */
.form-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.step {
    padding: 2rem 1.5rem;
    animation: slideIn 0.3s ease;
}

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

.step-header {
    margin-bottom: 1.5rem;
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ============================================
   FORMULÁRIO
   ============================================ */
.step-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 126, 52, 0.1);
}

.form-group input::placeholder {
    color: var(--text-gray);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ============================================
   OPÇÕES DE CONSUMO
   ============================================ */
.consumption-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--bg-white);
}

.option-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(30, 126, 52, 0.05);
}

.option-card.active {
    border-color: var(--primary-color);
    background-color: rgba(30, 126, 52, 0.1);
}

.option-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 8px;
    font-size: 1.5rem;
}

.option-content {
    flex: 1;
}

.option-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.option-content p {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.option-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-input .currency,
.option-input .unit {
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.9rem;
    white-space: nowrap;
}

.option-input input {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: right;
}

.option-input input:focus {
    border-color: var(--primary-color);
}

.divider {
    text-align: center;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* ============================================
   MAPA
   ============================================ */
.map-container {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.map {
    width: 100%;
    height: 300px;
    background-color: var(--bg-light);
}

.location-info {
    padding: 1rem;
    background-color: rgba(30, 126, 52, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

.location-info p {
    font-size: 0.9rem;
    color: var(--text-dark);
}

#coordinates {
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   RESULTADOS
   ============================================ */
.results-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 480px) {
    .results-container {
        grid-template-columns: 1fr 1fr;
    }
}

.result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, #f5f7fa 100%);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.result-card.highlight {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
}

.result-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 126, 52, 0.1);
    border-radius: 8px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.result-card.highlight .result-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.result-content {
    flex: 1;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.result-card.highlight .result-label {
    color: rgba(255, 255, 255, 0.8);
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-card.highlight .result-value {
    color: white;
}

.results-message {
    padding: 1rem;
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 1.5rem;
}

.results-message p {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
}

/* ============================================
   BOTÕES
   ============================================ */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    border-color: var(--text-gray);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-contact a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 480px) {
    .header-title {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 1rem 0.75rem;
    }

    .step {
        padding: 1.5rem 1rem;
    }

    .step-header h2 {
        font-size: 1.25rem;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .map {
        height: 250px;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .result-card.highlight {
        grid-column: 1;
    }
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem 1rem;
    }

    .step {
        padding: 2.5rem;
    }

    .map {
        height: 400px;
    }

    .results-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .result-card.highlight {
        grid-column: 1 / -1;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.hidden {
    display: none !important;
}

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

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

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

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

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