/* Brand Downloads Fetcher - Minimal Modern Design */
:root {
    --bdf-bg: #f8fafc;
    --bdf-card-bg: #ffffff;
    --bdf-border: #e2e8f0;
    --bdf-text: #1e293b;
    --bdf-text-muted: #64748b;
    --bdf-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --bdf-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --bdf-radius: 12px;
}

.bdf-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bdf-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bdf-card-bg);
    padding: 12px 20px;
    border-radius: var(--bdf-radius);
    box-shadow: var(--bdf-shadow);
    border: 1px solid var(--bdf-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bdf-card:hover {
    box-shadow: var(--bdf-shadow-hover);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.bdf-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.bdf-card:hover .bdf-icon-box {
    transform: scale(1.1);
}

.bdf-icon-box svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Platform-specific gradients */
.bdf-icon-box.ios {
    background: linear-gradient(135deg, #1e293b 0%, #000000 100%);
}

.bdf-icon-box.android {
    background: linear-gradient(135deg, #34d399 0%, #16a34a 100%);
}

.bdf-icon-box.windows {
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
}

.bdf-icon-box.mac {
    background: linear-gradient(135deg, #6b7280 0%, #374151 100%);
}

.bdf-icon-box.linux {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.bdf-icon-box.desktop {
    background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 100%);
}

.bdf-icon-box.webmail {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.bdf-text {
    text-align: left;
}

.bdf-label {
    font-size: 11px;
    color: var(--bdf-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.bdf-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bdf-text);
    margin: 0;
}

/* Desktop dropdown wrapper */
.bdf-desktop-wrapper {
    display: flex;
    align-items: stretch;
    background: var(--bdf-card-bg);
    border-radius: var(--bdf-radius);
    box-shadow: var(--bdf-shadow);
    border: 1px solid var(--bdf-border);
    overflow: visible;
    /* Changed from hidden to allow dropdown to show */
    transition: all 0.3s ease;
    position: relative;
    /* For dropdown positioning */
}

.bdf-desktop-wrapper:hover {
    box-shadow: var(--bdf-shadow-hover);
    border-color: #cbd5e1;
}

.bdf-desktop-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.bdf-desktop-main:hover {
    background: #f8fafc;
}

.bdf-os-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-left: 1px solid var(--bdf-border);
    background: #f8fafc;
}

.bdf-os-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bdf-os-icon svg {
    width: 14px;
    height: 14px;
    fill: #94a3b8;
    transition: fill 0.2s ease;
}

.bdf-os-icon:hover {
    background: white;
}

.bdf-os-icon:hover svg {
    fill: #3b82f6;
}

.bdf-os-icon.active svg {
    fill: #3b82f6;
}

/* Dropdown button */
.bdf-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-left: 1px solid var(--bdf-border);
    cursor: pointer;
    transition: background 0.2s ease;
    background: transparent;
}

.bdf-dropdown-btn:hover {
    background: #f1f5f9;
}

.bdf-dropdown-btn svg {
    width: 18px;
    height: 18px;
    fill: #94a3b8;
    transition: transform 0.3s ease;
}

.bdf-desktop-wrapper.open .bdf-dropdown-btn svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.bdf-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--bdf-border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.bdf-desktop-wrapper.open .bdf-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bdf-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--bdf-text);
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.bdf-dropdown-item:last-child {
    border-bottom: none;
}

.bdf-dropdown-item:hover {
    background: #f8fafc;
}

.bdf-dropdown-item svg {
    width: 20px;
    height: 20px;
    fill: #64748b;
    flex-shrink: 0;
}

.bdf-dropdown-item .bdf-dropdown-item-text {
    flex: 1;
}

.bdf-dropdown-item .bdf-download-arrow {
    width: 16px;
    height: 16px;
    fill: #94a3b8;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bdf-dropdown-item:hover .bdf-download-arrow {
    opacity: 1;
}

.bdf-dropdown-item.active {
    background: #eff6ff;
}

.bdf-dropdown-item.active svg {
    fill: #3b82f6;
}

.bdf-dropdown-item-text {
    font-size: 14px;
    font-weight: 500;
}

/* Desktop wrapper needs position relative for dropdown */
.bdf-desktop-wrapper {
    position: relative;
}

/* Responsive - Tablet and Mobile */
@media (max-width: 768px) {
    .bdf-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
        align-items: stretch;
    }

    .bdf-card {
        width: 100%;
        padding: 10px 14px;
        min-height: 70px;
        display: flex;
        align-items: center;
    }

    .bdf-desktop-wrapper {
        grid-column: span 1;
        min-height: 70px;
    }

    /* Hide OS icons on mobile, but keep dropdown button */
    .bdf-os-icons {
        display: none;
    }

    /* Smaller dropdown button on mobile */
    .bdf-dropdown-btn {
        padding: 0 8px;
        border-left: none;
    }

    /* Make the main link flex to fill space */
    .bdf-desktop-main {
        flex: 1;
        padding: 10px 8px 10px 14px;
    }

    .bdf-dropdown-menu {
        left: 0;
        right: 0;
    }

    .bdf-icon-box {
        width: 38px;
        height: 38px;
    }

    .bdf-icon-box svg {
        width: 20px;
        height: 20px;
    }

    .bdf-label {
        font-size: 10px;
    }

    .bdf-title {
        font-size: 14px;
    }
}

/* Very small screens - stack if needed */
@media (max-width: 380px) {
    .bdf-container {
        grid-template-columns: 1fr;
    }

    .bdf-desktop-wrapper {
        grid-column: span 1;
    }
}