/* ============================================================
   INVOICE MANAGER FRONTEND SEARCH STYLES
   ============================================================ */

.im-search-container {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #eef0eb;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(34, 40, 37, 0.03);
}

.im-search-title {
    font-size: 24px;
    font-weight: 800;
    color: #222825;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.im-search-desc {
    font-size: 14.5px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.im-search-form {
    margin-bottom: 20px;
}

.im-search-field-group {
    display: flex;
    gap: 12px;
    position: relative;
}

.im-search-input {
    flex: 1;
    height: 52px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    color: #222825;
    outline: none;
    background-color: #ffffff;
    transition: all 0.25s ease;
}

.im-search-input:focus {
    border-color: #e31e25; /* Stride Guard brand red */
    box-shadow: 0 0 0 3px rgba(227, 30, 37, 0.08);
}

.im-search-button {
    height: 52px;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 8px;
    border: none;
    background-color: #e31e25 !important;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(227, 30, 37, 0.15);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.im-search-button:hover:not(:disabled) {
    background-color: #b3141b !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(227, 30, 37, 0.25);
}

.im-search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner Animation */
.im-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: im-spin 0.8s linear infinite;
    display: inline-block;
}

.im-spinner.hidden {
    display: none;
}

@keyframes im-spin {
    to { transform: rotate(360deg); }
}

/* --- Results Wrapper --- */
.im-results-wrap {
    margin-top: 30px;
    animation: im-fade-in 0.3s ease;
}

.im-results-wrap.hidden {
    display: none;
}

@keyframes im-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.im-download-btn:hover {
    background-color: #b3141b !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(227, 30, 37, 0.35) !important;
}

.im-print-invoice-btn:hover {
    background-color: #e31e25 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(227, 30, 37, 0.25) !important;
}

/* --- PRINT STYLESHEET --- */
@media print {
    /* Hide headers, footers, sidebars, search box, and other layout components */
    header, 
    footer, 
    .site-header, 
    .site-footer, 
    #masthead, 
    #colophon,
    .im-search-title,
    .im-search-desc,
    .im-search-form,
    .im-invoice-actions,
    nav,
    aside {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .im-search-container {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .im-printable-invoice {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        width: 100% !important;
    }
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .im-search-container {
        padding: 24px 20px;
    }

    .im-printable-invoice {
        padding: 15px !important;
    }

    .im-printable-invoice > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}
