/* 
 * phone-lookup.css - Search Result Specific Styles
 */

/* 0. Global/Header Shrink */
.ticker-container {
    padding: 15px 0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
}

.ticker-item {
    padding: 0 15px;
}

header {
    padding: 0;
    margin: 0;
}

.header-footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-img {
    height: 30px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.header-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.2s;
    display: block;
}

.header-nav a:hover {
    opacity: 1;
}

/* 1. Search Section Layout */
.scrub-input {
    margin: 5px auto;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

#lookup-form {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on very small screens, but aim for one row */
}

#lookup-form input {
    flex: 1;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

#lookup-form input:focus {
    border-color: var(--primary-grey);
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.1);
}

#lookup-form button {
    background: var(--primary-grey);
    color: var(--accent-yellow);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

#lookup-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

#submit[disabled] .fa-search {
    display: none !important;
}

#submit[disabled] .fa-spinner {
    display: inline-block !important;
}

/* 2. Report Form Styles */
.report-container {
    padding: 0;
    margin-bottom: 25px;
}

#report-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

#report-form input, #report-form select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
}

.submit-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #d63031;
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.submit-label:hover {
    background: #b22222;
}

.submit-label input[type="submit"] {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.loader-icon {
    width: 20px;
    height: 20px;
    display: none;
}

/* 3. Search Results (TCPA & Cards) */
.tcpa-status, .cx-info {
    margin-bottom: 25px;
}

.heading {
    font-size: 1.5rem;
    font-weight: 750;
    color: var(--primary-grey);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.heading::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--accent-yellow);
    border-radius: 3px;
}

.tcpa {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.tcpa-heading {
    background: #ececec; /* Light gray background */
    color: #555555;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    padding: 8px;
    border: 1px dotted #888888;
    margin-bottom: 10px;
}

.tcpa-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dotted #888888; /* Dotted line between rows */
}

.tcpa-row:last-child {
    border-bottom: 1px dotted #888888;
}

.tcpa-label {
    font-weight: 700;
    color: #555555;
    font-size: 1.15rem;
    text-transform: none;
    letter-spacing: 0px;
}

.tcpa-label sub {
    font-size: 0.75rem;
    font-weight: 500;
    vertical-align: sub;
}

.tcpa-value {
    font-weight: 700;
    font-size: 1.15rem;
    color: #555555;
}

.cx-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.cx-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.cx-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-yellow);
}

.cx-basic {
    background: var(--primary-grey);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cx-name .label, .cx-age .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.cx-name .value, .cx-age .value {
    margin: 0;
}

.cx-addresses {
    padding: 15px 25px;
}

.cx-address {
    padding: 12px 0;
    border-bottom: 1px dotted rgba(128, 128, 128, 0.3);
    display: grid;
    grid-template-columns: 2fr 1fr 0.5fr 0.5fr auto;
    gap: 10px;
    font-size: 0.9rem;
}

.cx-address:last-child { border-bottom: none; }

.cx-address .label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.cx-address .value {
    font-weight: 600;
    color: var(--text-dark);
}

.deliverable {
    align-self: center;
    color: #00b894;
    font-weight: 900;
    font-family: sans-serif;
}

/* Loader Styling */
.cx-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 50px;
    gap: 12px;
}

.dot {
    width: 14px;
    height: 14px;
    background: var(--accent-yellow);
    border-radius: 50%;
    animation: dot-pulse 1.2s infinite ease-in-out both;
}

@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* 4. Responsive Design */
@media (max-width: 768px) {
    .header-footer-wrapper {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    #lookup-form {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .scrub-input h2 {
        width: 100%;
        white-space: normal;
        text-align: center;
        margin-bottom: 5px !important;
    }

    #num_wrap {
        flex: 1;
        min-width: 0; /* Allow shrinking */
    }

    #lookup-form button {
        width: auto;
        padding: 10px 15px;
    }

    #report-form {
        flex-direction: column;
        align-items: stretch;
    }

    #report-form input, #report-form select, .submit-label {
        width: 100%;
        justify-content: center;
    }

    .cx-cards {
        grid-template-columns: 1fr;
    }

    .cx-basic {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cx-address {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .cx-address-col.deliverable {
        grid-column: span 2;
        text-align: right;
    }
}

.hidden { display: none; }

.error-icon {
    position: absolute;
    right: 15px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 5;
}

#lookup-form input.error-state {
    border-color: #d63031 !important;
    padding-right: 40px; /* Make space for the icon */
}