/* Reset for the widget to ensure it doesn't break */
.rfc-calculator-container {
    font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
    color: #334155;
    background-color: #ffffff;
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05), 0 0 0 1px rgb(0 0 0 / 0.05); /* Soft, elegant shadow */
    box-sizing: border-box;
}

.rfc-calculator-container * {
    box-sizing: border-box;
}

/* Tabs Styling */
.rfc-tabs {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 2rem;
}

.rfc-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.rfc-tab:hover {
    color: #334155;
    background-color: #e2e8f0;
}

.rfc-tab.active {
    background-color: #ffffff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* Tab Content Visibility */
.rfc-tab-content {
    display: none;
}

.rfc-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.rfc-form-group {
    margin-bottom: 1.25rem;
}

.rfc-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.rfc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Inputs styling */
.rfc-form-group input[type="text"],
.rfc-form-group input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.rfc-form-group input[type="text"]:focus,
.rfc-form-group input[type="date"]:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rfc-form-group input::placeholder {
    color: #94a3b8;
}

/* Standard Calendar Icon alignment */
.rfc-form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.rfc-form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Inner Icon for specific fields based on image */
.rfc-icon-required {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    pointer-events: none; /* Let clicks pass through to input */
}

/* Button Styling (Exactly matching the design) */
.rfc-btn-primary {
    display: block;
    width: 100%;
    padding: 0.875rem;
    margin-top: 1.5rem;
    background-color: #2563eb; /* A bright, modern blue */
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.rfc-btn-primary:hover {
    background-color: #1d4ed8;
}

.rfc-btn-primary:active {
    transform: scale(0.99);
}

/* Result Container */
.rfc-result-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 4px;
    text-align: center;
}

.rfc-result-container h3 {
    margin-top: 0;
    font-size: 0.9rem;
    color: #166534;
    margin-bottom: 0.5rem;
}

.rfc-result-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #15803d;
    margin: 0;
    letter-spacing: 1px;
}

/* Error State */
.rfc-result-container.error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.rfc-result-container.error h3 {
    color: #991b1b;
}

.rfc-result-container.error .rfc-result-text {
    color: #b91c1c;
    font-size: 1rem;
    font-weight: 500;
}
