.csp-search-form {
    margin: 0.5em 0;
    font-size: 0.88rem;
}
.csp-search-box {
    border: 1px solid #ccc;
    padding: 1em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    background: #f9f9f9;
}
.csp-field {
    flex-basis: calc(50% - 0.8rem);
}
.csp-field-full {
    flex-basis: 100%;
}
.csp-search-form label {
    display: block;
    font-weight: 550;
    margin-bottom: 0.5em;
}
.csp-search-form select,
.csp-search-form input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-sizing: border-box;
}

/* Specific padding for date inputs */
.csp-search-form input[type="date"] {
    padding: 5px 11px;
}
.csp-extra-fields {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.8rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.csp-extra-fields.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Submit button field alignment */
.csp-field.csp-submit {
    text-align: center;
    margin: 1em auto 0;
}

@media (min-width: 835px) {
    .csp-search-form {
        font-size: 1rem;
    }
    .csp-search-box {
        padding: 2em 4em;
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        background: #eceef8;
    }
}

@media (max-width: 834px) {
    .csp-search-form {
        font-size: 0.88rem;
    }
    .csp-search-box {
        padding: 2em;
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        background: #eceef8;
    }
    .csp-search-form input[type="date"] {
        width: 130px;
    }
}

/* Modal styles */
.csp-modal {
    display: flex;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    clip-path: circle(0 at 0 100%);
    transition: opacity 0.4s ease, clip-path 0.4s ease;
}

.csp-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    clip-path: circle(150% at 0 100%);
}

.csp-modal-content {
    background: #fff;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow: hidden;
    position: relative;
    transform: scale(0);
    transform-origin: 0 100%;
    transition: transform 0.4s ease;
}

.csp-modal.active .csp-modal-content {
    transform: scale(1);
}

.csp-modal-close {
    position: absolute;
    right: 0.5em;
    top: 0.5em;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}

.csp-search-open {
    display: inline-block;
    padding: 0.5em 1em;
    background: #1843cb;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
