/**
 * CareerNest — Job Search Widget shortcode styles
 *
 * Emitted by `[careernest_job_search]`. Brand colors use CSS custom
 * properties (set in :root by class-plugin.php → output_custom_css)
 * with the default brand orange as a fallback so the widget still
 * renders if the variables block is absent for any reason.
 */

.cn-job-search-widget {
    background: #ffffff;
    padding: 28px 32px;
    border-radius: 8px;
    box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.06);
}

.cn-search-widget-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: #000000ff;
    text-align: center;
}

.cn-search-widget-form {
    max-width: 100%;
}

.cn-search-widget-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.cn-search-field-wrapper {
    display: flex;
    flex-direction: column;
}

.cn-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.cn-input-icon {
    position: absolute;
    left: 0.875rem;
    color: #718096;
    pointer-events: none;
    z-index: 1;
}

.cn-input-with-icon .cn-search-widget-input {
    padding-left: 2.75rem;
}

.cn-search-widget-input,
.cn-search-widget-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.cn-search-widget-input:focus,
.cn-search-widget-select:focus {
    outline: none;
    border-color: var(--cn-primary-btn, #FF8200);
    box-shadow: 0 0 0 3px rgba(var(--cn-primary-btn-rgb, 255, 130, 0), 0.1);
}

.cn-search-widget-select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.cn-search-widget-button {
    width: 100%;
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--cn-primary-btn, #FF8200);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cn-search-widget-button:hover {
    background: var(--cn-primary-btn-hover, #e37600);
}

.cn-search-widget-button:active {
    transform: translateY(1px);
}

.cn-search-icon {
    font-size: 1.1rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    .cn-search-widget-fields {
        grid-template-columns: 2fr 1.5fr 1.5fr auto;
        align-items: end;
    }

    .cn-search-widget-button {
        white-space: nowrap;
    }
}

/* Mobile optimization */
@media (max-width: 767px) {
    .cn-job-search-widget {
        padding: 1.5rem 1rem;
    }

    .cn-search-widget-title {
        font-size: 1.25rem;
    }

    .cn-search-text {
        display: inline;
    }
}
