/* Base Styles */
:root {
    --primary-color: #416da0;
    --primary-dark: #2a4e7c;
    --primary-light: #6793c8;
    --text-color: #333;
    --dark-text-color: #fff;
    --background-color: #303030;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary-light);
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark);
}

.progress-container {
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background-color: #9EFFFF;
    border-radius: 3px;
    overflow: hidden;
    margin-right: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #00A4A4;
    width: 0%;
    transition: var(--transition);
}

.progress-text {
    font-size: 14px;
    color: var(--dark-text-color);
}

/* Form Styles */
#nutritionForm {
    flex: 1;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.form-section {
    padding: 30px;
    display: none;
    animation: fadeIn 0.5s ease;
}

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

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

h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

p {
    margin-bottom: 20px;
    color: #666;
}

/* Add or update these styles for the welcome image */
.welcome-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.welcome-image img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

.welcome-image i {
    font-size: 80px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input,
.checkbox-option input {
    margin-right: 10px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.option-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.option-item:hover {
    border-color: var(--primary-color);
}

.option-item.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.option-item.selected i,
.option-item.selected p,
.option-item.selected small {
    color: var(--white);
}

.option-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.option-item p {
    margin-bottom: 5px;
    font-weight: 500;
}

.option-item small {
    color: #777;
    font-size: 12px;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.next-btn, .submit-btn {
    background-color: var(--primary-color);
    color: white;
}

.next-btn:hover, .submit-btn:hover {
    background-color: var(--primary-dark);
}

.back-btn {
    background-color: #f1f1f1;
    color: #666;
}

.back-btn:hover {
    background-color: #e1e1e1;
}

/* Circle Progress */
.circle-progress {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    position: relative;
}

.circle-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 8;
}

.circle-progress-value {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Footer Styles */
.form-footer {
    margin-top: 30px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 10px 20px;
    }
}

/* Credit card form styles */
.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

#creditCardFields {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
}

#creditCardFields h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

/* PIX payment styles */
#pixFields {
    margin-top: 20px;
}

.generate-pix-btn {
    width: 100%;
    padding: 12px;
    background-color: #00a859; /* PIX green color */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generate-pix-btn i {
    margin-right: 8px;
}

.generate-pix-btn:hover {
    background-color: #008c4a;
}

.generate-pix-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.pix-qrcode-box {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.pix-info-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.pix-text {
    flex: 1;
    padding-right: 15px;
}

.pix-text p {
    margin: 0;
    font-size: 14px;
}

.qrcode-image {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-image img {
    max-width: 100%;
    max-height: 100%;
}

.pix-code-container {
    display: flex;
    margin: 10px 0;
}

.pix-code-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    background-color: #f5f5f5;
}

.copy-btn {
    padding: 10px 15px;
    background-color: #00a859;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.copy-btn i {
    margin-right: 5px;
}

.copy-btn:hover {
    background-color: #008c4a;
}

.pix-expiration {
    font-size: 14px;
    color: #666;
    margin: 10px 0 0 0;
    text-align: center;
}

/* Spinner for loading state */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.purchase-box {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 2rem 0;
}

.purchase-box .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    color: #666;
}

.benefits-list li:before {
    content: '✓';
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.purchase-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.purchase-btn:hover {
    background: var(--primary-dark);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

.category-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: #e0e0e0;
}

.toggle-icon {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.2s;
}

.category-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.category-content {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.food-category {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.food-category h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-group label:hover {
    background-color: #e8f4fd;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}