/* Base Panel Container */
.header-personalize-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-top: -8px;
}

.header-personalize-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #0771B1;
    transition: all 0.2s ease;
}

.header-personalize-button:hover {
    background-color: rgba(7, 113, 177, 0.1);
    color: #064479;
}

.header-personalize-button .icon {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.header-personalize-button:hover .icon {
    transform: rotate(30deg);
}

/* Panel Container */
.header-personalize-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #DEE2E6;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;

    /* Base dimensions */
    min-width: 450px;
    max-width: 95vw;
    width: auto;
    padding-bottom: 80px;
    /* Extra space for button */

    /* Scroll settings */
    max-height: 80vh;
    overflow-y: scroll !important;
    overflow-x: hidden;

    /* Scroll styling for Firefox */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.header-personalize-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    width: 16px;
    height: 16px;
    background: white;
    border-left: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    transform: rotate(45deg);
}

/* Panel Content Styles */
.header-personalize-panel h3 {
    margin: 0 0 1rem 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    position: sticky;
    top: 0;
    background: white;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    z-index: 1;
}

.header-personalize-panel form {
    width: 100%;
}

/* Form Elements */
.header-form-group {
    width: 100%;
}

.header-form-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.header-form-group label {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Select and Input Fields */
.header-personalize-panel select,
.header-personalize-panel input[type="text"],
.header-personalize-panel input[type="number"],
.header-personalize-panel input[type="date"] {
    width: 100%;
    padding: 0.625rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.header-personalize-panel select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
    padding-right: 2rem;
}

/* Checkbox Styles */
.header-personalize-panel input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

.header-personalize-panel input[type="checkbox"]:checked {
    background-color: #0771B1;
    border-color: #0771B1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 75%;
    background-repeat: no-repeat;
    background-position: center;
}

/* Years Grid Layout */
.header-years-grid {
    display: grid;
    gap: 1rem 2rem;
    width: 100%;
    margin: 1rem 0;
}

.header-year-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

/* Action Links */
.header-actions-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    padding: 1rem 0;
    margin: 0.5rem 0 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.header-actions-container a {
    color: #0771B1;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    background-color: #f0f9ff;
    transition: all 0.2s ease;
}

.header-actions-container a:hover {
    background-color: #e0f2fe;
    color: #065d8f;
}

/* Submit Button Section */
.header-submit-button {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: white;
    border-top: 1px solid #e2e8f0;
}

.header-submit-button input[type="submit"] {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background-color: #0771B1;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.header-submit-button input[type="submit"]:hover {
    background-color: #065d8f;
}

/* Scrollbar Styling */
.header-personalize-panel::-webkit-scrollbar {
    width: 8px;
}

.header-personalize-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.header-personalize-panel::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 4px;
    border: 2px solid #f1f1f1;
}

.header-personalize-panel::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1a1;
}

