/* assets/css/calculators/fraction-calculator.css */

/* Widget Container */
.fc-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Calculator Card */
.fc-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    text-align: center;
}

/* Tabs */
.fc-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.fc-tab {
    background: #f3f4f6;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: 0.2s;
}

.fc-tab:hover {
    background: #e5e7eb;
}

.fc-tab.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* Input Area */
.fc-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.fc-fraction-stack {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-fraction-stack input {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
    background: #f8fafc;
}

.fc-fraction-stack input:focus {
    border-color: #4f46e5;
    background: #fff;
}

.fc-line {
    width: 100%;
    height: 3px;
    background: #374151;
    border-radius: 2px;
    margin: 6px 0;
}

.fc-operator {
    font-size: 2rem;
    font-weight: bold;
    color: #4f46e5;
    width: 40px;
}

/* Button */
.fc-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.fc-btn:hover {
    transform: translateY(-2px);
}

/* Result Area */
.fc-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed #e2e8f0;
    animation: fadeIn 0.5s ease;
    display: none;
}

.fc-result-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.fc-res-box {
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    border-radius: 16px;
    padding: 20px 30px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-res-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #1e40af;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Visual Fraction Result */
.fc-big-fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
}

.fc-bar {
    width: 100%;
    height: 4px;
    background: #1e3a8a;
    margin: 6px 0;
    border-radius: 2px;
}

/* Mixed Number */
.fc-mixed-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fc-mixed-wrapper>span {
    font-size: 3rem;
    font-weight: 800;
    color: #4f46e5;
}

.fc-small {
    font-size: 1.8rem;
}

.fc-small .fc-bar {
    height: 3px;
}

/* Steps Box */
.fc-steps-box {
    background: #fff;
    border-left: 5px solid #10b981;
    color: #374151;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    text-align: left;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.fc-steps-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #065f46;
}

.fc-steps-box p {
    margin: 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    font-weight: 600;
}

/* Meta Data (Decimal/Percent) */
.fc-meta {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.fc-meta-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.fc-meta-item span {
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.fc-meta-item b {
    font-size: 1.2rem;
    color: #111;
}

/* Actions */
.fc-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fc-copy,
.fc-reset {
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
    border: none;
}

.fc-copy {
    background: #1f2937;
    color: white;
}

.fc-copy:hover {
    background: #374151;
}

.fc-reset {
    background: #f3f4f6;
    color: #374151;
}

.fc-reset:hover {
    background: #e5e7eb;
}

.fc-error {
    margin-top: 15px;
    color: #b91c1c;
    font-weight: 500;
    background: #fef2f2;
    padding: 10px;
    border-radius: 8px;
    display: none;
    border: 1px solid #fecaca;
}

/* SEO Content */
.info-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 30px;
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.info-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.fc-formula-box {
    background: #f8fafc;
    padding: 20px;
    border-left: 4px solid #4f46e5;
    margin-bottom: 20px;
}

.fc-formula-box code {
    display: block;
    background: #fff;
    padding: 10px;
    border: 1px solid #e2e8f0;
    margin: 5px 0 15px;
    font-family: monospace;
    color: #d946ef;
    font-weight: bold;
}

.fc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.fc-table th {
    background: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.fc-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 12px;
    color: var(--text-muted);
}

/* FAQ */
.faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.faq-question {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.faq-answer {
    color: var(--text-muted);
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media(max-width: 500px) {
    .fc-input-group {
        gap: 10px;
    }

    .fc-fraction-stack input {
        padding: 8px;
        font-size: 1rem;
    }

    .fc-big-fraction {
        font-size: 2rem;
    }
}