/**
 * Branch Card Component Styles
 * Reusable across tooltip, mobile panel, and grid contexts
 */

.branch-card-component {
    --card-padding: 24px;
    --card-radius: 12px;
    --title-color: #2C3E50;
    --text-color: #4A5568;
    --separator-color: #357A96;
    --link-color: #357A96;
    width: 100%;
    box-sizing: border-box;
}

.branch-card-component .branch-title {
    font-family: 'Gotham', sans-serif;
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
    color: var(--title-color);
    margin: 0 0 0px 0;
    line-height: 1.3;
}

.branch-card-component .title-separator {
    height: 2px;
    background: var(--separator-color);
    margin-bottom: 20px;
    width: 40px;
}

.branch-card-component .branch-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.branch-card-component .info-row {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-color);
    font-family: "Gotham Book", 'Gotham', sans-serif;
    font-weight: 400;
    font-style: normal;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Mobile styles (up to 767px) */
@media (max-width: 767px) {
    .branch-card-component .info-row {
        font-size: 14px;
        line-height: 20px;
    }

    .branch-card-component .info-icon {
        width: 20px;
        height: 20px;
    }
}

/* Desktop styles (768px and up) */
@media (min-width: 768px) {
    .branch-card-component .info-row {
        font-size: 16px;
        line-height: 24px;
    }

    .branch-card-component .info-icon {
        width: 24px;
        height: 24px;
    }
}

/* Improved multi-line address and phone styling */
.branch-card-component .address-lines,
.branch-card-component .phone-lines {
    flex: 1 !important;
    line-height: 1.3;
    min-width: 0 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100% !important;
    box-sizing: border-box !important;
}

.branch-card-component .address-line,
.branch-card-component .phone-line {
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

.branch-card-component .address-line+.address-line,
.branch-card-component .phone-line+.phone-line {
    margin-top: 2px;
    /* Minimal spacing between lines */
}

/* Legacy br tag support (in case some content still uses it) */
.branch-card-component .info-row br {
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.branch-card-component .info-row>span {
    line-height: 1.4;
}

.branch-card-component .info-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-card-component .info-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Icons should remain black as originally designed */
}

.branch-card-component .info-row>span:not(.info-icon) {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.branch-card-component .maps-link {
    display: inline-flex;
    align-items: center;
    color: var(--link-color);
    text-decoration: none;
    font-family: "Gotham Book", 'Gotham', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
    margin-top: 8px;
    transition: opacity 0.2s ease;
}

.branch-card-component .maps-link:hover {
    opacity: 0.8;
}

/* Context-specific modifications */

/* Tooltip context - used in map widget */
.branch-card-tooltip {
    background: #ffffff;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 320px;
}

/* Mobile panel context */
.branch-card-mobile {
    background: #ffffff;
    padding: var(--card-padding);
}

/* Grid context - used in branch grid widget */
.branch-card-grid {
    background: #ffffff;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Prevent iOS from applying bold styling to phone numbers */
.branch-card-component .info-row>span {
    font-weight: normal !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Fallback for any tel: links that might be created */
a[href^="tel"] {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: normal !important;
}

/* Removed link-specific styles to avoid any visual changes */

@media (hover: hover) and (pointer: fine) {
    .branch-card-grid:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
}