/**
 * Realm Community Lookup Styles
 * Version: 4.2
 */

/* Search Wrapper */
.realm-search-wrapper {
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Search Input Group */
.realm-search-input-group {
    display: flex;
    gap: 0;
    max-width: 500px;
    margin: auto;
    box-shadow: 0 8px 25px rgba(1, 86, 145, 0.15);
    border-radius: 15px;
    overflow: hidden;
}

/* Labels */
.realm-search-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #015691;
    margin-bottom: 0.75rem;
}

/* Search Input */
.realm-search-input {
    flex: 1;
    padding: 1.5rem 2rem !important;
    font-size: 1.25rem;
    font-family: 'Poppins', sans-serif !important;
    border: none !important;
    outline: none !important;
    background: white;
    color: #2d3748;
    font-weight: 500;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    line-height: normal !important;
}

.realm-search-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.realm-search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Search Button */
.realm-search-button {
    background: #015691 !important;
    color: white !important;
    border: none !important;
    padding: 1.5rem 2.5rem !important;
    font-size: 1.25rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
    white-space: nowrap;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: normal !important;
    margin: 0 !important;
}

.realm-search-button:hover {
    background: #013d5f !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

.realm-search-button:focus {
    background: #013d5f !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Select Container */
.realm-select-container {
    display: none;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

/* Building Select */
.realm-building-select {
    width: 100% !important;
    padding: 1.25rem 1.5rem !important;
    font-size: 1.1rem !important;
    font-family: 'Poppins', sans-serif !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: white;
    color: #2d3748;
    outline: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 !important;
}

.realm-building-select:focus {
    border-color: #015691 !important;
    box-shadow: 0 0 0 3px rgba(1, 86, 145, 0.1) !important;
}

/* Result Container */
.realm-result-container {
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: center;
}

.realm-result-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #5f6368;
    margin-bottom: 1.5rem;
}

.realm-result-text strong {
    color: #015691;
}

/* Hub Button */
.realm-hub-button {
    background: #015691 !important;
    color: white !important;
    border: none !important;
    padding: 1.25rem 2.5rem !important;
    font-size: 1.25rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600;
    border-radius: 12px !important;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 4px 15px rgba(1, 86, 145, 0.2);
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.75rem;
    text-decoration: none !important;
    margin: 0 !important;
    line-height: normal !important;
}

.realm-hub-button:hover {
    background: #013d5f !important;
    color: white !important;
    transform: none !important;
}

.realm-hub-button:focus {
    background: #013d5f !important;
    color: white !important;
    border: none !important;
    outline: none !important;
}

.realm-hub-button-arrow {
    font-size: 1.5rem;
}

/* BlueBilling Portal Button */
.bluebilling-portal-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background-color: #015691 !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.bluebilling-portal-button:hover {
    background-color: #013d5f !important;
}

/* Loading Spinner */
.realm-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.realm-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #015691;
    animation: realm-spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

.realm-loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #5f6368;
    font-weight: 500;
}

/* Button loading state */
.realm-search-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wp-block-group .wp-block-group {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Fix column padding */
    .wp-block-column {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Reduce spacer height on mobile */
    .realm-search-card .wp-block-spacer {
        height: 0px !important;
    }

    .realm-search-wrapper {
        padding: 0 1rem;
        margin: 0 auto 1.5rem;
    }

    .realm-search-input-group {
        flex-direction: column;
        border-radius: 12px;
        margin: auto;
    }

    .realm-search-input {
        border-radius: 12px 12px 0 0 !important;
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    .realm-search-button {
        border-radius: 0 0 12px 12px !important;
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
        justify-content: center !important;
    }

    .realm-hub-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .realm-result-container {
        margin: 1.5rem auto 0;
        padding: 0 1rem;
    }

    /* Reduce building hub hero margins on mobile */
    .building-hub-hero {
        margin-bottom: 1rem !important;
        padding: 2rem 1rem !important;
    }

.building-hub-hero h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {

    .service-card {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}