/* Styles for the partner policy lookup control */
/*
    Base styles for the policy lookup card.  We adopt the card aesthetic used
    throughout the ATS site: soft backgrounds, generous padding, rounded
    corners and subtle shadows.  The lookup form is centered on the page
    with a max width to prevent it from stretching too far on large screens.
*/
.PartnerPolicyLookup {
    margin: 20px auto;
    max-width: 640px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    font-family: myriad-pro, sans-serif;
    color: #333;
    min-width:50%;
}

    /* Heading for the lookup form */
    .PartnerPolicyLookup h2 {
        margin: 0 0 20px 0;
        font-size: 1.6em;
        font-weight: 700;
        color: #101921;
        text-align: center;
    }

    /* Each form row stacks the label above the input */
    .PartnerPolicyLookup .FormRow {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
    }

    /* Labels are bold and separated from inputs */
    .PartnerPolicyLookup label {
        font-weight: 600;
        margin-bottom: 6px;
        color: #555;
    }

    /* Inputs fill the width and have generous padding */
    .PartnerPolicyLookup input[type="text"],
    .PartnerPolicyLookup input[type="email"] {
        width: 100%;
        padding: 12px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 1em;
        box-sizing: border-box;
        transition: border-color 0.2s;
    }

        /* Highlight inputs on focus */
        .PartnerPolicyLookup input[type="text"]:focus,
        .PartnerPolicyLookup input[type="email"]:focus {
            outline: none;
            border-color: #007bff;
        }

    /* Position buttons centrally below the form */
    .PartnerPolicyLookup .ButtonHolder {
        margin-top: 20px;
        text-align: center;
    }

        /* Style the search button to match call‑to‑action buttons */
        .PartnerPolicyLookup .ButtonHolder .SearchButton {
            padding: 12px 28px;
            background-color: #004080;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1em;
            font-weight: 600;
            transition: background-color 0.2s;
            width:100%;
        }

            .PartnerPolicyLookup .ButtonHolder .SearchButton:hover {
                background-color: #003366;
            }

    /* Results table styling */
    .PartnerPolicyLookup .PolicySummaryTable {
        width: 100%;
        border-collapse: collapse;
        margin-top: 25px;
        overflow: hidden;
        border-radius: 8px;
    }

        .PartnerPolicyLookup .PolicySummaryTable th,
        .PartnerPolicyLookup .PolicySummaryTable td {
            padding: 14px 16px;
            text-align: left;
            font-size: 0.95em;
        }

        .PartnerPolicyLookup .PolicySummaryTable th {
            background-color: #f4f4f4;
            color: #333;
            font-weight: 600;
            border-bottom: 2px solid #ddd;
        }

        .PartnerPolicyLookup .PolicySummaryTable td {
            border-bottom: 1px solid #eee;
        }

        .PartnerPolicyLookup .PolicySummaryTable tr:nth-child(even) td {
            background-color: #fafafa;
        }
        /* Style action links as buttons */
        .PartnerPolicyLookup .PolicySummaryTable a.ActionButton {
            display: inline-block;
            padding: 1.5em 2em;
            background-color: var(--ButtonColour);
            color: #fff !important;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: background-color 0.2s;
            width: 100% !important;
            display: flex !important;
            flex-grow: 1;
            justify-content: center;
            align-items: center;
        }

            .PartnerPolicyLookup .PolicySummaryTable a.ActionButton:hover {
                background-color: #003366;
                text-decoration: none;
            }

        /* Remove underline styling on regular links and keep color consistent */
        .PartnerPolicyLookup .PolicySummaryTable a {
            color: #004080;
            text-decoration: none;
        }

            .PartnerPolicyLookup .PolicySummaryTable a:hover {
                text-decoration: underline;
            }

    /* Message shown when no results are returned */
    .PartnerPolicyLookup .PolicySummaryList p {
        text-align: center;
        font-size: 1em;
        color: #666;
        margin-top: 20px;
    }

    /*
    Loading indicator styles.  The spinner provides a simple animated circle
    using CSS only.  The LoadingMessage container is hidden by default and
    shown via JavaScript during an active search.
*/
    .PartnerPolicyLookup .LoadingMessage {
        display: none;
        text-align: center;
        margin-top: 20px;
        font-size: 1em;
        color: #555;
        align-items: center;
        justify-content: center;
    }

        .PartnerPolicyLookup .LoadingMessage .Spinner {
            display: inline-block;
            width: 24px;
            height: 24px;
            border: 3px solid #ccc;
            border-top-color: #004080;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
        }

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



 a.PolicyLookupLink {
    background-color: var(--ButtonColour);
    color: #fff !important;
}


/* Responsive table styles: on small screens, stack rows and hide headers */
@media screen and (max-width: 600px) {

    .PartnerPolicyLookup {
    width:90%;
    }
        /* Hide table headers on mobile */
        .PartnerPolicyLookup .PolicySummaryTable thead {
        display: none;
    }
    /* Make table elements block-level to allow stacking */
    .PartnerPolicyLookup .PolicySummaryTable,
    .PartnerPolicyLookup .PolicySummaryTable tbody,
    .PartnerPolicyLookup .PolicySummaryTable tr,
    .PartnerPolicyLookup .PolicySummaryTable td {
        display: block;
        width: 100%;
    }
        /* Add spacing between stacked rows */
        .PartnerPolicyLookup .PolicySummaryTable tr {
            margin-bottom: 15px;
            border-bottom: 1px solid #eee;
        }
        /* Align text to the right and create room for labels */
        .PartnerPolicyLookup .PolicySummaryTable td {
            text-align: right;
            position: relative;
        }
            /* Prepend data-label content before each cell */
            .PartnerPolicyLookup .PolicySummaryTable td::before {
                content: attr(data-label);
                position: absolute;
                left: 0;
                top: 0;
                width: 50%;
                padding-left: 15px;
                font-weight: 600;
                text-align: left;
            }
            /* Ensure action buttons fit nicely on mobile */
            .PartnerPolicyLookup .PolicySummaryTable td a.ActionButton {
                width: auto;
                display: inline-block;
                padding: 10px 16px;
                margin-top: 8px;
            }
}
