/* Custom CSS for VA Disability Calculator */

/* Calculator container styling */
.calculator-container {
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 900px;
    width: 100%;
    border: 1px solid #e2e8f0;
    margin: 2rem auto; /* Center the container horizontally and add vertical margin */
}

/* Input group labels */
.input-group label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: block;
}

/* Input fields (select, number) */
.input-group select,
.input-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #334155;
    background-color: #f8fafc;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.input-group select:focus,
.input-group input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* General button styling */
.btn {
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
    width: 100%;
}

/* Specific button styles */
.btn-clear {
    background-color: #ef4444;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
    margin-top: 0.75rem;
}
.btn-clear:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

.btn-gemini {
    background-color: #6366f1;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    margin-top: 0.75rem;
}
.btn-gemini:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
}

/* Styling for the new percentage buttons in the overall rating section */
.btn-percentage {
    background-color: #3b82f6; /* Blue for percentage buttons */
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.2);
    padding: 0.5rem 0.75rem; /* Smaller padding for these buttons */
    font-size: 1rem; /* Smaller font size */
}
.btn-percentage:hover {
    background-color: #2563eb; /* Darker blue on hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Result display area */
.result-area {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center; /* This centers text within the flex item */
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* This centers flex items horizontally */
    min-height: 150px;
}

/* Explicitly center text within paragraphs inside result-area */
.result-area p {
    text-align: center;
    width: 100%; /* Ensure paragraphs take full width to center content within them */
}

/* Responsive layout for larger screens */
@media (min-width: 1024px) {
    .main-content-grid {
        display: flex;
        gap: 2rem;
        align-items: flex-start;
    }
    .input-column {
        flex: 1;
    }
    .result-column {
        flex: 1;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    .result-area {
        height: auto;
        margin-top: 0;
        margin-bottom: 1rem;
    }
}

/* Notes section */
.notes-section {
    background-color: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #854d09;
}
.notes-section ul {
    list-style-type: disc;
    margin-left: 1.25rem;
    padding-left: 0.5rem;
}
.notes-section summary {
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0;
}
.notes-section details[open] summary {
    margin-bottom: 0.75rem;
}

/* Gemini response area */
.gemini-response-area {
    background-color: #e0e7ff;
    border: 1px solid #93c5fd;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #1e3a8a;
    min-height: 50px;
}
.gemini-response-area ul { /* Ensure bullet points are styled within the Gemini response */
    list-style-type: disc;
    margin-left: 1.25rem;
    padding-left: 0.5rem;
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    font-weight: 600;
    color: #4f46e5;
}
.loading-indicator::after {
    content: '';
    animation: spin 1s linear infinite;
    border: 4px solid rgba(99, 102, 241, 0.3);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin-left: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles for the integrated Overall Disability Rating section */
.overall-rating-section {
    background-color: #e0e7ff; /* Light blue background for this section */
    border: 1px solid #93c5fd; /* Blue border */
    border-radius: 1.5rem; /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    padding: 2rem;
}

.combined-rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e2e8f0;
}
.combined-rating-item:last-child {
    border-bottom: none;
}
.remove-rating-btn {
    background-color: #f87171;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.remove-rating-btn:hover {
    background-color: #ef4444;
}

.combined-rating-result-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-top: 0.5rem;
}
.compensation-amount-display {
    font-size: 2.5rem;
    font-weight: 900;
    color: #047857;
}

/* Styles for the shop embed (if you choose to keep it in the same plugin) */
.uftp-shop-embed-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    min-height: 80vh;
}
.uftp-shop-embed-container iframe {
    width: 100%;
    flex-grow: 1;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 80vh;
}
.uftp-shop-embed-container .loading-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #6366f1;
}
.uftp-shop-embed-container .spinner {
    border: 4px solid rgba(99, 102, 241, 0.3);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}