/* Container Styling */
.fd-container {
    max-width: 600px;
    margin: auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: fadeIn 0.8s ease-in-out;
}

.fd-container h2 {
	text-align: center;
}

/* Input Group */
.fd-inputs label {
    display: block;
    margin-bottom: 20px;
    font-weight: 500;
    color: #333;
}

.fd-inputs input,
.fd-inputs select {
    width: 100%;
    padding: 12px 14px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f9f9f9;
    color: #111;
}

.fd-inputs input:focus,
.fd-inputs select:focus {
    border-color: #0073aa;
    outline: none;
}

.fd-inputs input[type="text"] {
	padding: 14px;
	font-size: 17px;
	color: black;
	height: 50px;
}

/* Results Section */
.fd-results {
    margin-top: 30px;
    font-size: 20px;
    font-weight: 600;
    background: #f0f8ff;
    padding: 16px;
    border-radius: 10px;
    color: #004b7c;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.fd-results p {
    margin: 10px 0;
}

/* Breakdown Table */
.fd-breakdown {
    width: 100%;
    margin-top: 30px;
    border-collapse: collapse;
    font-size: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.fd-breakdown th {
    background: #0073aa;
    color: white;
    font-weight: 600;
    padding: 12px;
    text-align: center;
}

.fd-breakdown td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.fd-breakdown tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* PDF Button */
button#fdDownloadPDF {
    padding: 12px 24px;
	display: block;
	margin: 24px auto 0 auto; /* top: 24px, auto center horizontally */
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

button#fdDownloadPDF:hover {
    background: #005f8d;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tenure-container {
    display: flex;
    align-items: center;
	gap: 15px; /* Adds spacing between input and toggle */
	flex-wrap: wrap; /* Optional for responsiveness */
    justify-content: flex-start;
}

#fdTenure {
    width: 85px;
    padding: 12px 14px;
    margin-right: 15px;
}

.tenure-toggle {
    display: flex;
    align-items: center;
	gap: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    margin: 0 5px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 10px;
    left: 0;
    right: 0;
    bottom: -10px;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(14px);
}

/* Hide the default radio buttons */
input[type="radio"] {
    display: none;
}

/* Style the labels to look like clickable text */
.fdTypeOptions {
    display: flex;
    justify-content: center; /* Center the content horizontally */
    align-items: center; /* Center vertically if needed */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.fdTypeOptions label {
    display: inline-block;
    font-size: 16px;
    font-weight: normal;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    color: #333; /* Default text color */
    margin-right: 20px; /* Space between labels */
    margin-bottom: 10px; /* Ensure some space at the bottom */
}

/* When radio is checked, apply styles to the label */
input[type="radio"]:checked + label {
    color: green; /* Change text color to green when selected */
    font-weight: bold;
    background-color: rgba(0, 255, 0, 0.2); /* Optional: Add background color */
    border-radius: 4px;
    padding: 8px 16px;
}

/* Add a hover effect for the labels */
.fdTypeOptions label:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Optional: Add focus styles to improve accessibility */
input[type="radio"]:focus + label {
    outline: 2px solid #4d90fe;
    outline-offset: 2px;
}

/* Responsive styles for smaller screens */
@media screen and (max-width: 768px) {
    .fdTypeOptions {
        flex-direction: column; /* Stack labels vertically on small screens */
        align-items: flex-start; /* Align to the left */
    }

    .fdTypeOptions label {
        margin-right: 0; /* Remove right margin on small screens */
        margin-bottom: 15px; /* Add bottom margin for spacing between labels */
    }
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .fd-container {
        padding: 18px;
    }

    .fd-inputs label {
        margin-bottom: 16px;
    }

    .fd-inputs input,
    .fd-inputs select {
        font-size: 15px;
        padding: 10px;
    }

    .fd-results {
        font-size: 18px;
    }

    button#fdDownloadPDF {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    .fd-breakdown th,
    .fd-breakdown td {
        padding: 8px;
        font-size: 14px;
    }
}