/* TinhBMI Plugin Styles */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

.bmi-app {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: 'Be Vietnam Pro', sans-serif;
    color: #1a2e1a;
}

.bmi-app *, .bmi-app *::before, .bmi-app *::after {
    box-sizing: border-box;
}

/* Card base */
.bmi-calc-card,
.bmi-result-card,
.bmi-details-card,
.bmi-tips-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 2px 20px rgba(45, 138, 78, 0.08);
    border: 1px solid #d4e5d4;
    margin-bottom: 24px;
}

/* Labels */
.bmi-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a6b4a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

/* Gender */
.bmi-gender-group {
    margin-bottom: 28px;
}

.bmi-gender-options {
    display: flex;
    gap: 12px;
}

.bmi-gender-option {
    flex: 1;
    padding: 14px;
    border: 2px solid #d4e5d4;
    border-radius: 10px;
    background: #f0f5f0;
    cursor: pointer;
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #4a6b4a;
    transition: all 0.3s ease;
    user-select: none;
}

.bmi-gender-option:hover {
    border-color: #2d8a4e;
    color: #2d8a4e;
}

.bmi-gender-option.active {
    border-color: #2d8a4e;
    background: #e8f5e9;
    color: #1b5e30;
    font-weight: 600;
}

.bmi-gender-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

/* Inputs */
.bmi-input-group {
    margin-bottom: 24px;
}

.bmi-input-group:last-of-type {
    margin-bottom: 32px;
}

.bmi-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bmi-input {
    width: 100%;
    padding: 16px 70px 16px 20px;
    border: 2px solid #d4e5d4;
    border-radius: 10px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1a2e1a;
    background: #f0f5f0;
    outline: none;
    transition: all 0.3s ease;
}

.bmi-input:focus {
    border-color: #2d8a4e;
    background: white;
    box-shadow: 0 0 0 4px rgba(45, 138, 78, 0.1);
}

.bmi-input::placeholder {
    color: #7a9a7a;
    font-weight: 400;
    font-size: 16px;
}

.bmi-unit {
    position: absolute;
    right: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #7a9a7a;
    pointer-events: none;
}

/* Button */
.bmi-btn {
    width: 100%;
    padding: 18px;
    background: #2d8a4e;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.bmi-btn:hover {
    background: #1b5e30;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 138, 78, 0.3);
}

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

/* Results */
.bmi-result-section {
    display: none;
    animation: bmiSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bmi-result-section.show {
    display: block;
}

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

.bmi-result-card {
    text-align: center;
}

.bmi-result-label {
    font-size: 13px;
    font-weight: 600;
    color: #7a9a7a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.bmi-result-number {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.bmi-result-category {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Scale */
.bmi-scale {
    margin: 28px 0 0;
}

.bmi-scale-bar {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right,
        #5b9bd5 0%, #5b9bd5 22%,
        #2d8a4e 22%, #2d8a4e 48%,
        #e8a838 48%, #e8a838 70%,
        #d94f4f 70%, #d94f4f 85%,
        #a03030 85%, #a03030 100%
    );
    position: relative;
}

.bmi-scale-pointer {
    position: absolute;
    top: -6px;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid #1a2e1a;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bmi-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: #7a9a7a;
    font-weight: 500;
}

/* Details */
.bmi-detail-title,
.bmi-tips-title {
    font-size: 13px;
    font-weight: 600;
    color: #7a9a7a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.bmi-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #d4e5d4;
}

.bmi-detail-row:last-child {
    border-bottom: none;
}

.bmi-detail-label {
    font-size: 14px;
    color: #4a6b4a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.bmi-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a2e1a;
    transition: all 0.3s ease;
}

.bmi-detail-value.current {
    background: #e8f5e9;
    color: #1b5e30;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Tips */
.bmi-tip-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
}

.bmi-tip-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.bmi-tip-text {
    font-size: 14px;
    color: #4a6b4a;
    line-height: 1.6;
}

/* Shake animation */
@keyframes bmiShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Responsive */
@media (max-width: 480px) {
    .bmi-calc-card,
    .bmi-result-card,
    .bmi-details-card,
    .bmi-tips-card {
        padding: 28px 22px;
    }

    .bmi-result-number {
        font-size: 52px;
    }
}

/* ── BMR Calculator Styles ───────────────────────── */
.bmi-select {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a6b4a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
    cursor: pointer;
}

.bmr-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bmr-result-box {
    text-align: center;
    padding: 20px 16px;
    border-radius: 12px;
    background: #f0f5f0;
}

.bmr-number {
    font-size: 48px !important;
    color: #2d8a4e !important;
}

.tdee-color {
    color: #e8a838 !important;
}

.bmr-unit-label {
    font-size: 14px;
    font-weight: 600;
    color: #7a9a7a;
    margin-bottom: 8px;
}

.bmr-desc {
    font-size: 13px;
    color: #7a9a7a;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 480px) {
    .bmr-results-grid {
        grid-template-columns: 1fr;
    }
    .bmr-number {
        font-size: 40px !important;
    }
}

/* ═══ Affiliate Product Widget ═══════════════════ */
.bmi-affiliate-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 20px rgba(45, 138, 78, 0.08);
    border: 1px solid #d4e5d4;
    margin-top: 24px;
}

.bmi-affiliate-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e1a;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmi-affiliate-icon {
    font-size: 20px;
}

.bmi-affiliate-subtitle {
    font-size: 13px;
    color: #7a9a7a;
    margin-bottom: 20px;
}

.bmi-affiliate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.bmi-product {
    border: 1px solid #e8f0e8;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafcfa;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bmi-product:hover {
    border-color: #2d8a4e;
    box-shadow: 0 4px 16px rgba(45, 138, 78, 0.1);
    transform: translateY(-2px);
}

.bmi-product-emoji {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.bmi-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a2e1a;
    margin-bottom: 6px;
    line-height: 1.3;
}

.bmi-product-desc {
    font-size: 12px;
    color: #7a9a7a;
    margin-bottom: 12px;
    line-height: 1.5;
    flex-grow: 1;
}

.bmi-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #d94f4f;
    margin-bottom: 12px;
}

.bmi-product-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #ee4d2d;
    color: white !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s;
    width: 100%;
}

.bmi-product-btn:hover {
    background: #d73211;
    color: white !important;
    transform: translateY(-1px);
}

.bmi-product-btn.lazada {
    background: #0f146d;
}

.bmi-product-btn.lazada:hover {
    background: #0a0e4a;
}

.bmi-product-btn.iherb {
    background: #3a7728;
}

.bmi-product-btn.iherb:hover {
    background: #2d5e1f;
}

.bmi-product-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bmi-product-tag.hot {
    background: #fff0f0;
    color: #d94f4f;
}

.bmi-product-tag.bestseller {
    background: #fff8e6;
    color: #e8a838;
}

.bmi-product-tag.recommend {
    background: #e8f5e9;
    color: #2d8a4e;
}

.bmi-affiliate-disclaimer {
    margin-top: 16px;
    font-size: 11px;
    color: #aabfaa;
    text-align: center;
    font-style: italic;
}

@media (max-width: 480px) {
    .bmi-affiliate-grid {
        grid-template-columns: 1fr;
    }
    .bmi-affiliate-card {
        padding: 24px 18px;
    }
}
