/**
 * ConvMaster - Gloves Size Converter Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 2rem;
}

.tool-header__icon .icon--green {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   GLOVES WIDGET
   ===================================================== */
.gloves-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.widget-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 1rem;
}

.widget-toolbar__left,
.widget-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-toolbar__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Toolbar Buttons */
.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toolbar:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.btn-toolbar__icon {
    font-size: 1rem;
}

/* Popup Button */
.btn-popup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.btn-popup__icon {
    font-size: 1rem;
}

/* =====================================================
   GENDER SECTION
   ===================================================== */
.gender-section {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.gender-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gender-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: center;
}

.gender-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.gender-tab.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.gender-tab__icon {
    font-size: 1.25rem;
}

/* =====================================================
   MODE SECTION
   ===================================================== */
.mode-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.mode-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.mode-tab.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.mode-tab__icon {
    font-size: 1rem;
}

/* =====================================================
   CONVERSION SECTION
   ===================================================== */
.conversion-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.conversion-section[hidden] {
    display: none;
}

.conversion-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.conversion-group {
    min-width: 200px;
}

.conversion-group--sizes {
    flex: 1;
}

.conversion-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.conversion-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.conversion-group select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Size Buttons */
.size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-btn {
    min-width: 56px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.size-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.size-btn.active {
    color: white;
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* =====================================================
   CALCULATOR SECTION
   ===================================================== */
.calculator-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.calculator-section[hidden] {
    display: none;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.calc-input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.calc-icon {
    font-size: 1rem;
}

.optional {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.calc-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.calc-input-wrapper input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.calc-input-wrapper input::-webkit-outer-spin-button,
.calc-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input-wrapper input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.calc-input-wrapper input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.calc-input-wrapper select {
    width: 70px;
    padding: 0.875rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.calc-actions {
    display: flex;
    justify-content: center;
}

.btn-calculate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-calculate:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* =====================================================
   MESSAGE CONTAINER
   ===================================================== */
.message-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    margin: 0 1.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.message-container[hidden] {
    display: none;
}

.message-container--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.message-container--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.message-container--info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

/* =====================================================
   RESULTS SECTION
   ===================================================== */
.results-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.results-section[hidden] {
    display: none;
}

.results-header {
    margin-bottom: 1rem;
}

.results-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-card {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: #10b981;
}

.result-card--recommended {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.result-card__flag {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.result-card__region {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.result-card__size {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-card__badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.results-recommendation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

/* =====================================================
   SIZE CHART
   ===================================================== */
.chart-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-units {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.unit-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-btn:hover {
    color: var(--text-primary);
}

.unit-btn.active {
    color: white;
    background: #10b981;
}

.chart-wrapper {
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

.size-chart {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.size-chart th,
.size-chart td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.size-chart th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.size-chart td {
    color: var(--text-secondary);
}

.size-chart tbody tr:hover {
    background: var(--bg-secondary);
}

.size-chart tbody tr.highlight {
    background: rgba(16, 185, 129, 0.1);
}

.chart-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin: 0;
    font-style: italic;
}

/* =====================================================
   MEASURING GUIDE
   ===================================================== */
.measure-guide {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.measure-guide h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}

.guide-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

/* Hand Diagram */
.guide-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hand-diagram {
    width: 100%;
    max-width: 180px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.hand-svg {
    width: 100%;
    height: auto;
    color: var(--text-primary);
}

.hand-outline {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.diagram-label {
    font-size: 10px;
    font-weight: 600;
}

.diagram-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.legend-color {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-item--circumference .legend-color {
    background: #10b981;
}

.legend-item--length .legend-color {
    background: #3b82f6;
}

/* Steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-step {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.guide-step__number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.guide-step__content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.guide-step__content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Tips Box */
.tips-box {
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin: 0 1.5rem 1.5rem;
}

.tips-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 0 0 0.75rem;
}

.tips-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.tips-box li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

.tips-box li:last-child {
    margin-bottom: 0;
}

/* =====================================================
   PRIVACY NOTICE
   ===================================================== */
.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.seo-content {
    margin-top: 2rem;
}

.seo-section {
    margin-bottom: 2.5rem;
}

.seo-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.seo-section > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--text-tertiary);
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.step-card {
    position: relative;
    padding: 1.25rem;
    padding-left: 3.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-card__number {
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.step-card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .tool-page {
        padding: 1rem 0.75rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
    
    .widget-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .widget-toolbar__left,
    .widget-toolbar__right {
        justify-content: center;
    }
    
    .gender-tabs {
        flex-direction: column;
    }
    
    .gender-tab {
        min-width: 100%;
    }
    
    .mode-tabs {
        flex-direction: column;
    }
    
    .mode-tab {
        justify-content: center;
    }
    
    .conversion-row {
        flex-direction: column;
    }
    
    .conversion-group {
        min-width: 100%;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .guide-content {
        grid-template-columns: 1fr;
    }

    .guide-visual {
        order: -1;
    }

    .hand-diagram {
        max-width: 160px;
        margin: 0 auto;
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .result-card {
        padding: 0.75rem;
    }
    
    .result-card__size {
        font-size: 1.5rem;
    }
    
    .size-buttons {
        justify-content: center;
    }
    
    .size-btn {
        min-width: 48px;
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
}
