﻿/* ============================================================
   MerchAsst Unit Converter System - Shared Styles
   Used by all 8 unit converter tools to guarantee a unified
   visual system. Theme: indigo (#4f46e5) site standard.
   ============================================================ */

/* ===== Tool Section ===== */
.uc-tool-section { padding: 48px 0 80px; background: #f8fafc; }
.uc-tool-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(10, 25, 47, 0.12);
    overflow: hidden;
}

/* ===== Converter Card ===== */
.uc-card { padding: 40px; }
.uc-card h2 { font-size: 22px; font-weight: 700; color: #1e293b; margin: 0 0 8px; }
.uc-card .section-subtitle { font-size: 14px; color: #475569; margin: 0 0 28px; line-height: 1.5; }

/* ===== Form Grid ===== */
.uc-form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto 1fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 28px;
}
.uc-form-group { margin-bottom: 0; }
.uc-form-group label {
    display: block; font-size: 13px; font-weight: 600; color: #1e293b;
    margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.uc-form-group input,
.uc-form-group select {
    width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
    border: 1.5px solid #e2e8f0; border-radius: 10px; color: #1e293b;
    background: #ffffff; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.uc-form-group input:focus,
.uc-form-group select:focus {
    border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.uc-form-group input::placeholder { color: #cbd5e1; }

/* ===== Swap Button ===== */
.uc-swap-btn {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid #e2e8f0; background: #ffffff;
    color: #4f46e5; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s; flex-shrink: 0; margin-bottom: 4px;
}
.uc-swap-btn:hover {
    background: #4f46e5; color: #ffffff; border-color: #4f46e5;
    transform: rotate(180deg);
}

/* ===== Action Buttons ===== */
.uc-actions { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.uc-btn {
    padding: 12px 22px; font-size: 14px; font-weight: 600; font-family: inherit;
    border-radius: 10px; cursor: pointer; transition: all 0.2s;
    border: 1.5px solid transparent; display: inline-flex; align-items: center; gap: 8px;
}
.uc-btn-primary { background: #4f46e5; color: #ffffff; border-color: #4f46e5; }
.uc-btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.uc-btn-ghost { background: #ffffff; color: #475569; border-color: #e2e8f0; }
.uc-btn-ghost:hover { border-color: #4f46e5; color: #4f46e5; }
.uc-btn.copied { background: #10b981; color: #fff; border-color: #10b981; }

/* ===== Error ===== */
.uc-error {
    display: none; background: #fef2f2; color: #b91c1c;
    padding: 12px 16px; border-radius: 10px; font-size: 14px;
    margin-bottom: 20px; border: 1px solid #fecaca;
}

/* ===== Result Card ===== */
.uc-result {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}
.uc-result-label {
    font-size: 12px; font-weight: 600; color: #475569;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.uc-result-from {
    font-size: 18px; color: #475569; font-weight: 500; margin-bottom: 12px;
}
.uc-result-arrow {
    font-size: 22px; color: #4f46e5; margin: 8px 0;
}
.uc-result-value {
    font-size: 42px; font-weight: 800; color: #4f46e5;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2; word-break: break-all;
}
.uc-result-to {
    font-size: 16px; color: #475569; font-weight: 500; margin-top: 8px;
}

/* ===== Section: Quick Table / Common Units ===== */
.uc-section {
    max-width: 1100px; margin: 40px auto 0; padding: 0;
}
.uc-section-title {
    font-size: 20px; font-weight: 700; color: #1e293b;
    margin: 0 0 20px; display: flex; align-items: center; gap: 10px;
}
.uc-section-title i { color: #4f46e5; }

/* Quick Conversion Table */
.uc-table-wrap {
    background: #ffffff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(10, 25, 47, 0.06);
    border: 1px solid #e2e8f0;
}
.uc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.uc-table thead th {
    background: #f8fafc; padding: 14px 18px; text-align: left;
    font-weight: 600; color: #1e293b; border-bottom: 2px solid #e2e8f0;
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
}
.uc-table tbody td {
    padding: 14px 18px; border-bottom: 1px solid #f1f5f9; color: #475569;
}
.uc-table tbody tr:last-child td { border-bottom: none; }
.uc-table tbody tr:hover { background: #f8fafc; }
.uc-table .num { font-family: 'JetBrains Mono', monospace; color: #4f46e5; font-weight: 600; }

/* Use Cases grid */
.uc-use-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.uc-use-item {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 16px 18px; display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: #475569; font-weight: 500;
}
.uc-use-item i { color: #4f46e5; font-size: 18px; }

/* How to use */
.uc-how-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.uc-how-step {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 18px 14px; text-align: center;
}
.uc-how-num {
    width: 32px; height: 32px; border-radius: 50%; background: #4f46e5;
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
}
.uc-how-text { font-size: 13px; color: #475569; line-height: 1.5; }

/* FAQ */
.uc-faq-list { max-width: 1100px; margin: 40px auto 0; }
.uc-faq-item {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: border-color 0.2s;
}
.uc-faq-item.active { border-color: rgba(79, 70, 229, 0.2); }
.uc-faq-q {
    padding: 18px 24px; font-size: 15px; font-weight: 600; color: #1e293b;
    cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; user-select: none;
}
.uc-faq-q .chevron { color: #94a3b8; transition: transform 0.3s; font-size: 18px; flex-shrink: 0; }
.uc-faq-item.active .uc-faq-q .chevron { transform: rotate(180deg); }
.uc-faq-a {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
    padding: 0 24px;
}
.uc-faq-item.active .uc-faq-a { max-height: 300px; padding: 0 24px 18px; }
.uc-faq-a p { font-size: 14px; color: #475569; line-height: 1.7; margin: 0; }

/* Related Tools */
.uc-related-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.uc-related-card {
    display: flex; align-items: center; gap: 12px;
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 16px 18px; text-decoration: none; color: #1e293b;
    font-weight: 600; font-size: 14px; transition: all 0.2s;
}
.uc-related-card:hover {
    border-color: #4f46e5; color: #4f46e5; transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.1);
}
.uc-related-card .ic {
    width: 36px; height: 36px; border-radius: 8px;
    background: #eef2ff; color: #4f46e5;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}

/* Privacy / Disclaimer */
.uc-privacy {
    max-width: 1100px; margin: 32px auto 0; padding: 20px 24px;
    background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0;
    font-size: 13px; color: #64748b; line-height: 1.6; text-align: center;
}
.uc-privacy i { color: #10b981; margin-right: 6px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .uc-card { padding: 28px 20px; }
    .uc-form-grid { grid-template-columns: 1fr; gap: 14px; }
    .uc-swap-btn { margin: 0 auto; transform: rotate(90deg); }
    .uc-swap-btn:hover { transform: rotate(270deg); }
    .uc-result { padding: 24px 18px; }
    .uc-result-value { font-size: 32px; }
    .uc-how-grid { grid-template-columns: 1fr 1fr; }
    .uc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .uc-table { min-width: 480px; }
}
@media (max-width: 480px) {
    .uc-how-grid { grid-template-columns: 1fr; }
    .uc-result-value { font-size: 26px; }
}
