/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Main App Container - Ultimate Theme */
#tf-converter-ultimate {
    font-family: 'Manrope', sans-serif;
    background-color: #f7f8fc;
    color: #1a2333;
    padding: 20px;
    border-radius: 24px;
    max-width: 100%;
    margin: 40px auto;
    border: 1px solid #e6eaf3;
}

.tfc-ultimate-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 30px; }
.tfc-ultimate-icon { width: 32px; height: 32px; color: #0891b2; }
.tfc-ultimate-title { font-size: 1.8rem; font-weight: 700; color: #1a2333; }

/* Main Layout */
.tfc-ultimate-main-layout {
	display: flex;
	flex-direction: column;
	gap: 30px;
    align-items: center;
	margin: 20px 0;
}

/* Form Container */
.tfc-ultimate-form-container {
	background-color: #ffffff;
	padding: 30px;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	width: 100%;
	margin: 30px 0;
}

.tfc-ultimate-form { display: flex; flex-direction: column; gap: 25px; }

/* Input Section */
.tfc-ultimate-input-section { padding-bottom: 10px; }
.tfc-ultimate-time-row {
    display: flex;
    align-items: flex-end; /* Align groups to the bottom */
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.tfc-ultimate-input-group {
    flex: 1;
    min-width: 70px;
    max-width: 110px;
}
/* MODIFIED: Label styles to match new image */
.tfc-ultimate-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b; /* A muted blue-gray */
    margin-bottom: 8px;
    text-align: left;
    padding-left: 2px;
}
.tfc-ultimate-input-group input, .tfc-ultimate-input-group select {
    width: 100%;
    padding: 10px 0;
    font-size: 1.5rem; /* Slightly smaller font for balance */
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: #0f172a;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #cbd5e1; /* Thinner default line */
    border-radius: 0;
    text-align: center;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield; /* Show steppers on firefox */
}
/* Allow steppers to show on Webkit browsers */
.tfc-ultimate-input-group input[type=number]::-webkit-inner-spin-button, 
.tfc-ultimate-input-group input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: auto;
  opacity: 0.5;
  margin-left: 5px;
}

.tfc-ultimate-input-group input:focus, .tfc-ultimate-input-group select:focus {
    outline: none;
    border-color: #0891b2;
    border-bottom-width: 2px;
    padding-bottom: 9px; /* Adjust padding to keep height consistent */
}

.tfc-ultimate-input-group input::placeholder {
    color: #94a3b8;
    font-weight: 700;
    opacity: 1;
}
.tfc-input-hidden {
    display: none;
}

/* Settings */
.tfc-ultimate-settings { border: none; padding: 0; margin-top: 20px;}
.tfc-ultimate-settings-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
    text-align: center;
}
.tfc-ultimate-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.tfc-ultimate-checkbox-group input[type="checkbox"] { display: none; }
.tfc-ultimate-checkbox-group label {
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.tfc-ultimate-checkbox-group input[type="checkbox"]:checked + label {
    background-color: #0891b2;
    color: white;
    border-color: #0891b2;
}

/* Controls */
.tfc-ultimate-controls { display: flex; gap: 15px; margin-top: 10px; }
.tfc-ultimate-button {
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
}
.tfc-ultimate-button-convert { background-color: #0e7490; color: white; }
.tfc-ultimate-button-convert:hover { background-color: #0891b2; transform: translateY(-3px); box-shadow: 0 7px 20px rgba(8, 145, 178, 0.2); }
.tfc-ultimate-button-reset { background-color: #f1f5f9; color: #475569; }
.tfc-ultimate-button-reset:hover { background-color: #e2e8f0; }

/* Result Container */
.tfc-ultimate-result-container {
    display: none; 
    justify-content: center;
    align-items: center;
    min-height: 350px;
}
.tfc-ultimate-results-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 450px;
    height: 450px;
    background: linear-gradient(145deg, #ffffff, #e6eaf3);
    border-radius: 50%;
    box-shadow: 10px 10px 20px #d8dbe2, -10px -10px 20px #ffffff;
    padding: 63px;
    text-align: center;
    animation: tfc-ultimate-fadeIn 0.5s ease;
} 


@keyframes tfc-ultimate-fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.tfc-ultimate-result-main {
    font-size: 4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}
.tfc-ultimate-summary-text { font-size: 1rem; color: #475569; margin-top: 15px; }
.tfc-ultimate-summary-text span { color: #0e7490; font-weight: 700; }

/* Content & Tables */
.tfc-ultimate-content-wrapper { padding-top: 20px; }
.tfc-ultimate-content-section { margin-bottom: 35px; }
.tfc-ultimate-content-heading { font-size: 1.6rem; font-weight: 700; color: #0f172a; margin-bottom: 15px; border-bottom: 2px solid #0891b2; padding-bottom: 8px; }
.tfc-ultimate-content-subheading { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin-top: 25px; margin-bottom: 10px; }
.tfc-ultimate-content-text { line-height: 1.8; color: #334155; }
.tfc-ultimate-content-list { padding-left: 25px; list-style-type: '✔  '; }
.tfc-ultimate-content-list li { margin-bottom: 10px; padding-left: 10px; }

.tfc-conversion-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}
.tfc-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.tfc-table th, .tfc-table td { padding: 12px 15px; text-align: left; }
.tfc-table thead {
    background-color: #c89543; /* Gold/Orange Header */
    color: white;
    font-weight: 600;
}
.tfc-table th:first-child { border-radius: 8px 0 0 0; }
.tfc-table th:last-child { border-radius: 0 8px 0 0; }
.tfc-table tbody tr { border-bottom: 1px solid #e2e8f0; }
.tfc-table tbody tr:nth-child(even) { background-color: #f8fafc; }
.tfc-table td:last-child { font-weight: 600; color: #0f172a; }

/*
=================================================================
 TFC ULTIMATE - RESPONSIVE STYLES
=================================================================
*/
@media (max-width: 1024px) {
    .tfc-conversion-tables {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .tfc-ultimate-results-section {
        width: 320px;
        height: 320px;
        padding: 45px;
    }
    .tfc-ultimate-result-main {
        font-size: 3rem;
    }
}
@media (max-width: 600px) {
    .tfc-ultimate-controls {
        flex-direction: column;
    }
    .tfc-ultimate-results-section {
        width: 290px;
        height: 290px;
        padding: 40px;
    }
    .tfc-ultimate-result-main {
        font-size: 2.6rem;
    }
    .tfc-ultimate-input-group {
        min-width: 60px;
        max-width: 90px;
    }
}
@media (max-width: 480px) {
    .tfc-ultimate-time-row {
        gap: 10px;
    }
    .tfc-ultimate-results-section {
        width: 85vw;
        height: 85vw;
        max-width: 260px;
        max-height: 260px;
        padding: 15%;
    }
    .tfc-ultimate-result-main {
        font-size: 2rem;
    }
}