/**
 * SF Branch List Plugin Styles
 */

/* Container */
.sf-branch-list-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Filter Buttons */
.sf-branch-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.sf-filter-btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 20px;
    font-family: 'ITCAvantGardeStd-Md';
    background-color: white;
    border-color: transparent;
}

/*.sf-filter-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}*/

.sf-filter-btn.active {
    background-color: #FF0056;
    color: white;
}

/* Horizontal Divider */
.sf-branch-divider {
    border: none;
    height: 2px;
    background: white;
    margin: 20px 0;
}

/* Grid Layout */
.sf-branch-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sf-branch-row {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.sf-branch-column {
    flex: 1;
    border-bottom: 1px solid white;
}

/*.sf-branch-column:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}*/

.sf-branch-column-full {
    flex: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Storefriendly Tower special layout */
.sf-storefriendly-column {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0 5px;
}

.sf-storefriendly-column:first-child {
    margin-left: 0;
}

.sf-storefriendly-column:last-child {
    margin-right: 0;
}

/* Invisible title for alignment */
.sf-region-title.sf-invisible {
    visibility: hidden;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
}

/* Region Titles */
.sf-region-title {
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: rgb(0, 71, 157);
    border-bottom: white;
    text-align: left;
}

/* Branch Items */
.sf-branch-items {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.sf-branch-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/*.sf-branch-item:hover {
    background-color: #e9ecef;
    transform: translateX(3px);
}*/

.sf-branch-name {
    font-weight: 600;
    color: rgb(0, 71, 157);
    font-size: 12px;
    margin-bottom: 4px;
}

/* Branch name links */
.sf-branch-name a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.sf-branch-name a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.sf-branch-name a:visited {
    color: inherit;
}

/* Sub-region headers */
.sf-sub-region-header {
    /*margin-top: 10px;*/
    /*margin-bottom: 5px;*/
}

.sf-sub-region-header:first-child {
    margin-top: 0;
}

.sf-sub-region-name {
    font-weight: 600;
    color: rgb(0, 71, 157);
    font-size: 12px;
    /*margin-bottom: 4px;
    border-bottom: 1px solid rgb(0, 71, 157);
    padding-bottom: 2px;*/
    display: inline-block;
}

/* Sub-region group container */
.sf-sub-region-group {
    margin-bottom: 15px;
}

.sf-sub-region-group:last-child {
    margin-bottom: 0;
}

.sf-sub-region-group .sf-sub-region-header {
    margin-bottom: 8px;
}

.sf-sub-region-group .sf-branch-item {
    margin-bottom: 5px;
}

.sf-sub-region-group .sf-branch-item:last-child {
    margin-bottom: 0;
}

.sf-branch-tel {
    /*color: #6c757d;*/
    font-size: 12px;
    /*font-family: monospace;*/
    text-decoration: none;
}

/* Telephone links */
.sf-branch-tel a {
    text-decoration: none;
    color: inherit;
    font-size: inherit;
}

.sf-branch-tel a:hover {
    text-decoration: none;
    opacity: 0.8;
}

.sf-branch-tel a:visited {
    color: inherit;
    text-decoration: none;
}

a.sf-branch-tel {
    text-decoration: none;
    color: rgb(0, 71, 157);
    font-family: 'ITCAvantGardeStd-Md';
    font-size: 12px;
}

/* No Branches Message */
.sf-no-branches {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* List Layout */
.sf-branch-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sf-region-section {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sf-branch-list .sf-branch-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: transparent;
    border-left: none;
    border-bottom: 1px solid #e9ecef;
}

.sf-branch-list .sf-branch-item:last-child {
    border-bottom: none;
}

/*.sf-branch-list .sf-branch-item:hover {
    background-color: #f8f9fa;
    transform: none;
}*/

.sf-branch-list .sf-branch-name {
    margin-bottom: 0;
    margin-right: 10px;
}

/* Branch name links in list layout */
.sf-branch-list .sf-branch-name a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.sf-branch-list .sf-branch-name a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.sf-branch-list .sf-branch-name a:visited {
    color: inherit;
}

/* Sub-region headers in list layout */
.sf-branch-list .sf-sub-region-header {
    margin-top: 15px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-left: 4px solid rgb(0, 71, 157);
}

.sf-branch-list .sf-sub-region-header:first-child {
    margin-top: 5px;
}

.sf-branch-list .sf-sub-region-name {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.sf-branch-separator {
    color: #adb5bd;
    margin: 0 5px;
}

/* Hidden regions (for filtering) */
.sf-region-hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sf-branch-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .sf-branch-column {
        flex: none;
    }
    
    .sf-branch-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .sf-branch-list-container {
        padding: 15px;
    }
    
    .sf-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .sf-branch-column {
        padding: 15px;
    }
    
    .sf-region-title {
        font-size: 16px;
    }
    
    .sf-branch-name {
        font-size: 15px;
    }
    
    .sf-branch-tel {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sf-branch-filters {
        justify-content: center;
    }
    
    .sf-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .sf-branch-list .sf-branch-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .sf-branch-separator {
        display: none;
    }
    
    /* Stack Storefriendly Tower columns on mobile */
    .sf-storefriendly-column {
        flex: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
    
    .sf-storefriendly-column .sf-region-title.sf-invisible {
        display: none;
    }
}

/* Animation for region show/hide */
.sf-branch-column,
.sf-region-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
/*.sf-filter-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}*/

/* Print styles */
@media print {
    .sf-branch-filters {
        display: none;
    }
    
    .sf-branch-divider {
        display: none;
    }
    
    .sf-branch-column,
    .sf-region-section {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
}