/* Main Styles for Belenop Skin Analyzer - Light Mode, Minimal NextJS Style */
:root {
    --primary-color: #000000;
    --secondary-color: #666666;
    --background-color: #ffffff;
    --card-background: #f5f5f5;
    --light-gray: #eaeaea;
    --medium-gray: #999999;
    --dark-gray: #333333;
    --success-color: #0070f3;
    --danger-color: #ff0000;
    --border-radius: 15px;
    --border-radius-lg: 12px;
    --font-main: 'IRANYekanXFaNum';
    --box-shadow: 0 2px 10px rgb(0 0 0 / 5%);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent;
}

body {

    background-color: var(--background-color);
    color: var(--primary-color);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background-color: var(--background-color);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--light-gray);
}

header h1 {
    text-align: center;
    flex-grow: 1;
    font-size: 24px;
    font-weight: 600;
}

.back-btn, .menu-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scaleX(-1); /* Flip for RTL */
}

/* Main Content Styles */
main {
    flex-grow: 1;
    padding: 20px 0 80px;
}

/* Form Step Styles */
.step {
    margin-bottom: 20px;
}

h2 {
    margin: 25px 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Dropdown Styles */
.dropdown-container {
    position: relative;
    margin: 10px 0 15px;
    border-radius: var(--border-radius-lg);
    background-color: var(--background-color);
    transition: var(--transition);
}

select {
    width: 100%;
    padding: 14px 16px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    appearance: none;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-main);
    text-align: right;
    padding-left: 40px; /* Space for the arrow on the left in RTL */
    padding-right: 16px;
    transition: var(--transition);
    outline: none;
    box-shadow: var(--box-shadow);
}

select:hover, .dropdown-container:hover select {
    border-color: var(--medium-gray);
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.dropdown-arrow {
    position: absolute;
    left: 16px; /* Changed from right to left for RTL */
    right: auto;
    top: 40%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 10px;
    height: 10px;
    display: inline-block;
    border-left: 1.5px solid var(--medium-gray);
    border-bottom: 1.5px solid var(--medium-gray);
    transform: translateY(-30%) rotate(-45deg);
    transition: var(--transition);
}

.dropdown-container:hover .dropdown-arrow {
    border-color: var(--primary-color);
}

/* Tags/Checkbox Styles */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 15px;
}

.tag {
    position: relative;
}

.tag input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.tag label {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag input[type="checkbox"]:checked + label {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.close-icon {
    display: none;
    margin-right: 5px; /* Changed from margin-left for RTL */
}

.tag input[type="checkbox"]:checked + label .close-icon {
    display: inline;
}

/* Textarea Styles */
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    resize: none;
    height: 100px;
    font-family: var(--font-main);
    font-size: 14px;
    direction: rtl;
    text-align: right;
    box-shadow: var(--box-shadow);
}

/* Button Styles */
.primary-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    font-family: var(--font-main);
    box-shadow: var(--box-shadow);
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: var(--box-shadow);
}

/* Webcam Styles */
.webcam-step {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--background-color);
    display: none;
}

.webcam-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-guide-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.7;
}

.capture-status {
    position: absolute;
    bottom: 120px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.capture-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: inline-block;
    border: 1px solid var(--medium-gray);
}

.dot.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.dot.completed {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.capture-instruction {
    position: absolute;
    bottom: 100px;
    margin: auto;
    width: 100%;
    padding: 20px 60px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    z-index: 2;
    font-family: var(--font-main);
    filter: drop-shadow(2px 4px 8px black);
}

/* Manual Capture Button Styles */
.manual-capture-btn {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--box-shadow);
    font-family: var(--font-main);
}

.manual-capture-btn:hover {
    opacity: 0.9;
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.manual-capture-btn:active {
    transform: translateX(-50%) translateY(0);
    box-shadow: var(--box-shadow);
}

/* Results Styles */
.result-step {
    padding: 20px 0;
}

.result-container {
    text-align: right;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 10px;
}

.skin-analysis {
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
    text-align: right;
    color: var(--dark-gray);
}

.metrics-container {
    margin: 30px 0;
}

.metric {
    margin-bottom: 20px;
    text-align: right;
}

.metric h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.meter-container {
    width: 100%;
    height: 6px;
    background-color: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
}

.meter {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 1s ease-in-out;
}

/* Pagination Dots */
.pagination-dots {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    z-index: 5;
    display: none;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
}

.pagination-dot.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 16px;
    border-radius: 4px;
}

/* Step Transitions */
.step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback message for camera */
#cameraFallbackMessage {
    background-color: var(--background-color) !important;
    box-shadow: var(--box-shadow) !important;
    border-radius: var(--border-radius) !important;
}

#cameraFallbackMessage h3,
#cameraFallbackMessage p {
    text-align: center;
    font-family: var(--font-main);
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    header {
        padding: 15px 0;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 15px;
    }
    
    select, .primary-btn {
        padding: 12px;
    }
    
    .tag label {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Face Scan Progress Bar Styles */
.face-scan-progress-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 500px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1000;
}

.face-scan-progress {
    height: 100%;
    width: 0%;
    background-color: #ffffff;
    transition: width 0.5s ease-in-out;
}

.face-scan-progress.completed {
    background-color: #4CAF50;
}

/* Glider Switch Tab Styles */
.tab-switch-container {
    width: 100%;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    display: flex;
    position: relative;
    margin: 15px 0;
    overflow: hidden;
}

.tab-switch-container .tab-option {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
    color: var(--secondary-color);
}

.tab-switch-container .tab-option.active {
    color: var(--background-color);
}

.tab-switch-container .tab-glider {
    position: absolute;
    height: 100%;
    width: 50%;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    right: 0;
    top: 0;
}

.tab-switch-container.right .tab-glider {
    right: 50%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

/* Advanced Report Styles */
.advanced-report {
    margin-top: 30px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.advanced-report h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.report-section {
    margin-bottom: 25px;
    padding: 0 5px;
}

.report-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    padding-right: 15px;
}

.report-section h4::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Key Metrics Styles */
.key-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.key-metric {
    background-color: var(--light-gray);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

.metric-name {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Challenges List Styles */
.challenges-list {
    list-style-type: none;
    padding: 0;
}

.challenges-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    position: relative;
    padding-right: 35px;
    font-size: 14px;
}

.challenges-list li::before {
    content: '!';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Recommended Products Styles */
.recommended-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-category {
    margin-bottom: 15px;
}

.product-category h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.product {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 12px;
    height: 100%;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.product-benefit {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Routines Styles */
.routines {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.routine {
    margin-bottom: 15px;
}

.routine h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--light-gray);
}

.routine-steps {
    padding-right: 25px;
    padding-left: 10px;
}

.routine-steps li {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--dark-gray);
    position: relative;
}

.routine-steps li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

/* Special Tips Styles */
.special-tips {
    list-style-type: none;
    padding: 0;
}

.special-tips li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    position: relative;
    padding-right: 30px;
    font-size: 13px;
}

.special-tips li::before {
    content: '💡';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* Action Buttons Styles */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.secondary-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.secondary-btn:hover {
    background-color: var(--light-gray);
    transform: translateY(-1px);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .key-metrics,
    .recommended-products,
    .routines {
    }
    
    .report-section h4 {
        font-size: 15px;
    }
    
    .product-name,
    .metric-value {
        font-size: 14px;
    }
    
    .challenges-list li,
    .special-tips li,
    .routine-steps li {
        font-size: 12px;
    }
} 