/* Fitness and Nutrition Calculators - Main Styles */

/* Import Font Awesome for icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

.fnc-calculator {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    overflow: hidden;
}

.fnc-calculator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9, #1abc9c);
    border-radius: 20px 20px 0 0;
}

.fnc-calculator h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.fnc-calculator h2::before {
    content: '\f54e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3498db;
    font-size: 1.8rem;
}

.fnc-calculator h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #1abc9c);
    border-radius: 2px;
}

.fnc-form {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.fnc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.fnc-form-group {
    display: flex;
    flex-direction: column;
}

.fnc-form-group label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fnc-form-group label::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3498db;
    font-size: 0.9rem;
}

.fnc-form-group label[for="age"]::before { content: '\f1fd'; }
.fnc-form-group label[for="gender"]::before { content: '\f182'; }
.fnc-form-group label[for="weight"]::before { content: '\f3cd'; }
.fnc-form-group label[for="height"]::before { content: '\f6b3'; }
.fnc-form-group label[for="activity_level"]::before { content: '\f70c'; }
.fnc-form-group label[for="current_weight"]::before { content: '\f3cd'; }
.fnc-form-group label[for="desired_weight"]::before { content: '\f3cd'; }
.fnc-form-group label[for="time_frame"]::before { content: '\f073'; }
.fnc-form-group label[for="amount"]::before { content: '\f3d1'; }
.fnc-form-group label[for="from_unit"]::before { content: '\f0e7'; }
.fnc-form-group label[for="to_unit"]::before { content: '\f0e7'; }

.fnc-form-group input,
.fnc-form-group select {
    padding: 1rem 1.25rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.fnc-form-group input:focus,
.fnc-form-group select:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.fnc-form-group input:focus,
.fnc-form-group select:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
}

.fnc-form-group input[type="number"] {
    -moz-appearance: textfield;
}

.fnc-form-group input[type="number"]::-webkit-outer-spin-button,
.fnc-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fnc-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.fnc-btn::before {
    content: '\f0b1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
}

.fnc-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

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

.fnc-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fnc-results {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    border-left: 5px solid #3498db;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

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

.fnc-results::before {
    content: '\f080';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #3498db;
    font-size: 1.5rem;
    opacity: 0.3;
}

.fnc-results h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.fnc-results h3::before {
    content: '\f080';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3498db;
    font-size: 1.3rem;
}

.fnc-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.fnc-results-table th,
.fnc-results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.fnc-results-table th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1.25rem 1rem;
    position: relative;
}

.fnc-results-table th::before {
    content: '\f080';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.5rem;
    opacity: 0.8;
}

.fnc-results-table tr:hover {
    background: #f8f9fa;
}

.fnc-results-table tr:last-child td {
    border-bottom: none;
}

.fnc-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    position: relative;
    border-left: 4px solid #f39c12;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.fnc-warning::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #f39c12;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.fnc-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    position: relative;
    border-left: 4px solid #17a2b8;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-direction: column;
}

.fnc-info::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #17a2b8;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.fnc-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.fnc-loading::before {
    content: '\f0b1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2rem;
    color: #3498db;
    animation: pulse 1.5s ease-in-out infinite;
}

.fnc-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e1e8ed;
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

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

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

.fnc-unit-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.fnc-unit-toggle label {
    font-weight: 600;
    color: #34495e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fnc-unit-toggle label::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3498db;
    font-size: 0.9rem;
}

.fnc-unit-toggle label:first-child::before { content: '\f3cd'; }
.fnc-unit-toggle label:nth-child(5)::before { content: '\f6b3'; }

.fnc-unit-toggle input[type="radio"] {
    margin: 0;
    accent-color: #3498db;
}

.fnc-unit-toggle input[type="radio"] + label {
    margin-left: 0.25rem;
    font-weight: normal;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fnc-unit-toggle input[type="radio"]:checked + label {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-weight: 600;
}

.fnc-macro-split {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fnc-macro-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fnc-macro-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.fnc-macro-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #1abc9c);
}

.fnc-macro-item h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fnc-macro-item .percentage {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3498db;
    margin: 0.5rem 0;
}

.fnc-macro-item .grams {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    font-weight: 500;
}

.fnc-resources {
    margin-top: 2rem;
    padding: 1rem;
    background: #ecf0f1;
    border-radius: 8px;
}

.fnc-resources h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.fnc-resources ul {
    margin: 0;
    padding-left: 1.5rem;
}

.fnc-resources li {
    margin-bottom: 0.25rem;
}

.fnc-resources a {
    color: #3498db;
    text-decoration: none;
}

.fnc-resources a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fnc-calculator {
        margin: 1rem;
        padding: 1rem;
    }
    
    .fnc-form-row {
        grid-template-columns: 1fr;
    }
    
    .fnc-results-table {
        font-size: 0.9rem;
    }
    
    .fnc-results-table th,
    .fnc-results-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .fnc-macro-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .fnc-calculator h2 {
        font-size: 1.5rem;
    }
    
    .fnc-form-group input,
    .fnc-form-group select {
        padding: 0.5rem;
    }
    
    .fnc-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    .fnc-calculator {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .fnc-btn {
        display: none;
    }
    
    .fnc-results {
        border: 1px solid #ccc;
    }
}
