/* Variables */
:root {
    --primary-color: #048aae;
    --secondary-color: #43BDA7;
    --text-color: #2E2E2E;
    --border-color: #D4D4D4;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --background-light: #f8f9fa;
    --background-success: #E0FFF9;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray: #6c757d;
    --gray-dark: #343a40;
}

/* Click-to-reveal contact styles */
.click-to-reveal {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.click-to-reveal:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 189, 167, 0.15);
}

.click-to-reveal .contact-placeholder {
    font-weight: 500;
    transition: color 0.3s ease;
}

.click-to-reveal:hover .contact-placeholder {
    /* color: #ffffff; */
}

.click-to-reveal .contact-actual {
    /* color: #222; */
    font-weight: 400;
}

.click-to-reveal .contact-actual a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.click-to-reveal .contact-actual a:hover {
    color: #048aae;
}

/* Business Card Styles */
.business-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
}

.business-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.business-image-section {
    background-color: var(--background-light);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px 0 0 12px;
}

.circular-image-container {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #4dd0cc;
    margin-bottom: 15px;
    background: #ffffff;
}

.circular-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.business-name {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
}

.business-details {
    padding: 2rem;
}

.business-title {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray);
    font-size: 1rem;
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    width: 20px;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--secondary-color);
}

.business-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-end;
}

.modality-badge .badge {
    background-color: var(--background-success);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modality-badge .badge i {
    color: var(--secondary-color);
}

.right-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 20px;
    width: 85%;
    align-items: stretch;
}

.btn-action {
    padding: 6px 18px;
    border-radius: 50px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 0;
    min-width: 0;
    min-height: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.btn-action:hover {
    transform: translateY(-1px);
}

.btn-action svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.btn-action > span:not(.contact-placeholder):not(.contact-actual) {
    flex: 1;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-action .contact-placeholder,
.btn-action .contact-actual {
    flex: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.2;
}

.btn-action .contact-actual {
    display: none;
}

.btn-action.btn-disabled {
    background: #e9eff3;
    color: #6b7280 !important;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-action.btn-disabled svg {
    color: #6b7280;
    fill: currentColor;
}

.btn-action.btn-disabled span {
    color: #6b7280 !important;
}

.click-to-reveal.revealed .contact-placeholder {
    display: none;
}

.click-to-reveal.revealed .contact-actual {
    display: flex !important;
}

.btn-action .contact-actual a {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unavailable-label {
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.action-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #3aa893;
    border-color: #3aa893;
}

/* Loading States */
.loader-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.empty-state img {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Scroll Buttons */
.scroll-to-top,
.scroll-to-bottom {
    position: fixed;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(67, 189, 167, 0.3);
    transition: all 0.2s;
    z-index: 1000;
}

.scroll-to-top {
    bottom: 80px;
}

.scroll-to-bottom {
    bottom: 20px;
}

.scroll-to-top:hover,
.scroll-to-bottom:hover {
    background-color: #3aa893;
    transform: translateY(-2px);
}

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

.loading-more .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-light);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE BUSINESS CARDS ===== */

/* Large Desktop (1400px and up) */
@media (min-width: 1400px) {
    .business-card {
        min-height: 12.5rem;
        margin-bottom: 2.5rem;
    }

    .business-card-left {
        min-width: 15rem;
        min-height: 12.5rem;
    }

    .circular-image-container {
        width: 16rem;
        height: 16rem;
    }

    .circular-image-container img {
        width: 16rem;
        height: 16rem;
    }

    .business-card-right h3 {
        font-size: 1.6rem;
    }

    .contact-details {
        font-size: 1.15rem;
    }
}

/* Desktop (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .business-card {
        margin-bottom: 2rem;
    }
}

/* Tablet Landscape (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .business-listing {
        padding: 2rem 0;
    }

    .business-card {
        margin-bottom: 1.75rem;
    }

    .business-card-right {
        padding: 0.9375rem 1.5rem 0.9375rem 1.25rem;
    }

    .business-card-right h3 {
        font-size: 1.35rem;
    }

    .circular-image-container {
        width: 14rem;
        height: 14rem;
    }

    .circular-image-container img {
        width: 14rem;
        height: 14rem;
    }
}

/* Tablet Portrait (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .business-listing {
        padding: 1.75rem 0;
    }

    .business-card {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        margin-bottom: 1.5rem;
        min-height: auto;
    }

    .business-card-left {
        border-radius: 1.25rem 1.25rem 0 0;
        min-width: unset;
        min-height: 8rem;
        padding: 1rem 0;
        justify-content: center;
    }

    .circular-image-container {
        width: 6rem;
        height: 6rem;
        border: 0.25rem solid #43BDA7;
    }

    .circular-image-container img {
        width: 6rem;
        height: 6rem;
    }

    .business-card-right {
        padding: 1.25rem 0.75rem 1.25rem 1rem;
        border-radius: 0 0 1.25rem 1.25rem;
        min-width: 0;
    }

    .business-card-right h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        max-width: calc(100% - 8rem);
    }

    .modality-badge {
        top: 1.25rem;
        right: 1.5rem;
    }

    .modality-pill {
        font-size: 1rem;
        padding: 0.3125rem 1.125rem 0.3125rem 0.75rem;
    }

    .business-card-actions {
        gap: 0.625rem;
        margin-top: 1rem;
    }

    .btn-claim, .btn-profile {
        padding: 0.4375rem 1rem;
        font-size: 0.85rem;
    }

    .user-name {
        font-size: 1rem;
        margin: 0.5rem 0 0;
    }
}

/* Mobile Landscape (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .business-listing {
        padding: 1.5rem 0;
    }

    .business-card {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
        margin-bottom: 1.25rem;
        min-height: auto;
    }

    .business-card-left {
        border-radius: 1.25rem 1.25rem 0 0;
        min-width: unset;
        min-height: 6.875rem;
        padding: 1rem 0;
        justify-content: center;
    }

    .circular-image-container {
        width: 5rem;
        height: 5rem;
        border: 0.25rem solid #43BDA7;
    }

    .circular-image-container img {
        width: 5rem;
        height: 5rem;
    }

    .business-card-right {
        padding: 1rem 0.875rem 1rem 0.875rem;
        border-radius: 0 0 1.25rem 1.25rem;
        min-width: 0;
    }

    .business-card-right h3 {
        font-size: 1.1rem;
        margin-bottom: 0.625rem;
        max-width: 100%;
    }

    .modality-badge {
        position: static;
        margin-bottom: 0.625rem;
        margin-left: auto;
        align-self: flex-start;
    }

    .modality-pill {
        font-size: 0.6rem;
        padding: 0.25rem 0.875rem 0.25rem 0.625rem;
    }

    .contact-details {
        font-size: 0.95rem;
    }

    .contact-details div {
        margin-bottom: 0.3125rem;
    }

    .contact-details span {
        font-size: 0.95rem;
    }

    .business-card-actions {
        gap: 0.5rem;
        margin-top: 0.875rem;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .btn-claim, .btn-profile {
        padding: 0.375rem 0.875rem;
        font-size: 0.8rem;
    }

    .user-name {
        font-size: 1rem;
        margin: 0.5rem 0 0;
    }
}

/* Mobile Portrait (320px to 575px) */
@media (max-width: 575px) {
    .business-listing {
        padding: 1rem 0;
    }

    .business-card {
        flex-direction: column !important;
        margin-bottom: 1rem;
        border-radius: 1rem;
        width: 100%;
    }

    .business-card-left {
        border-radius: 1rem 1rem 0 0;
        min-height: 6rem;
        padding: 0.75rem 0;
        width: 100%;
        flex: none;
    }

    .circular-image-container {
        width: 4.5rem;
        height: 4.5rem;
        border: 0.1875rem solid #43BDA7;
    }

    .circular-image-container img {
        width: 4.5rem;
        height: 4.5rem;
    }

    .business-card-right {
        padding: 1rem 0.75rem;
        border-radius: 0 0 1rem 1rem;
        overflow: visible;
        width: 100%;
        flex: none;
    }

    .business-card-right h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
    }

    .modality-pill {
        font-size: 0.5rem;
        padding: 0.1875rem 0.75rem 0.1875rem 0.5rem;
    }

    .contact-details {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .contact-details div {
        margin-bottom: 0.5rem;
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .contact-details img {
        flex-shrink: 0;
        width: 1.1rem;
        height: 1.1rem;
        margin-top: 0.1rem;
    }

    .contact-details span {
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        flex: 1;
    }

    .business-card-actions {
        gap: 0.5rem;
        margin-top: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .btn-claim, .btn-profile {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        white-space: normal;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-text-full {
        display: inline;
    }

    .btn-text-short {
        display: none;
    }

    .user-name {
        font-size: 0.9rem;
        margin: 0.375rem 0 0;
    }

    .empty-state {
        padding: 2rem 0.75rem;
    }

    .empty-state img {
        width: 6rem;
    }

    .empty-state h4 {
        font-size: 1.25rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }
}

/* Landscape Orientation (max-height: 500px) */
@media (orientation: landscape) and (max-height: 500px) {
    .business-listing {
        padding: 0.5rem 0;
    }

    .business-card {
        margin-bottom: 0.75rem;
    }

    .business-card-left {
        min-height: 4rem;
        padding: 0.5rem 0;
    }

    .circular-image-container {
        width: 3.5rem;
        height: 3.5rem;
        border: 0.125rem solid #43BDA7;
    }

    .circular-image-container img {
        width: 3.5rem;
        height: 3.5rem;
    }

    .business-card-right {
        padding: 0.5rem 0.5rem;
    }

    .business-card-right h3 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .contact-details {
        font-size: 0.8rem;
    }

    .contact-details div {
        margin-bottom: 0.125rem;
    }

    .business-card-actions {
        margin-top: 0.5rem;
        gap: 0.25rem;
    }

    .btn-claim, .btn-profile {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .user-name {
        font-size: 1.2em;
        margin: 0.25rem 0 0;
    }
}

/* Very Small Screens (320px and below) */
@media (max-width: 320px) {
    .business-listing {
        padding: 0.75rem 0;
    }

    .business-card {
        flex-direction: column !important;
        margin-bottom: 0.75rem;
        border-radius: 0.75rem;
        width: 100%;
    }

    .business-card-left {
        min-height: 5rem;
        padding: 0.5rem 0;
        width: 100%;
        flex: none;
    }

    .circular-image-container {
        width: 4rem;
        height: 4rem;
        border: 0.125rem solid #43BDA7;
    }

    .circular-image-container img {
        width: 4rem;
        height: 4rem;
    }

    .business-card-right {
        padding: 0.75rem 0.5rem;
        width: 100%;
        flex: none;
    }

    .business-card-right h3 {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }

    .contact-details {
        font-size: 0.8rem;
    }

    .contact-details div {
        margin-bottom: 0.2rem;
    }

    .business-card-actions {
        margin-top: 0.5rem;
        gap: 0.25rem;
    }

    .btn-claim, .btn-profile {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .user-name {
        font-size: 0.8rem;
        margin: 0.25rem 0 0;
    }

    .btn-text-full {
        display: none;
    }

    .btn-text-short {
        display: inline;
    }
}
