/* Merchants Section */
.merchants-section {
    padding: 4rem 2rem;
    background: white;
}

.merchants-filters {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.filter-wrapper {
    position: relative;
}

.filter-select {
    appearance: none;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.filter-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #64748b;
    pointer-events: none;
}

.merchants-search {
    max-width: 500px;
    margin: 0 auto 3rem;
}

.merchants-search .search-box {
    position: relative;
}

.merchants-search .search-box input {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 3.5rem 1rem 3.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.merchants-search .search-box input:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.merchants-search .search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.merchants-search .clear-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.merchants-search .clear-icon:hover {
    color: #ef4444;
}

.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    position: relative;
}

.merchants-grid.collapsed {
    max-height: 220px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.merchants-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.merchant-item {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.merchant-item:hover .merchant-logo {
    border: 2px solid #e11d48;
    transform: translateY(-2px);
}

.merchant-logo {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.merchant-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.merchant-status-group {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 3px;
    z-index: 5;
}

.merchant-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.merchant-status.bitcoin-status {
    background: #22c55e; /* Zelená pro přímé bitcoin platby */
}

.merchant-status.voucher-status {
    background: #3b82f6; /* Modrá pro dárkové poukazy */
}

.merchant-status.card-status {
    background: #f59e0b; /* Oranžová pro karty kryté bitcoinem */
}

.merchants-footer {
    text-align: center;
    margin-top: 2rem;
}

.expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.expand-toggle.hidden {
    display: none;
}

.expand-toggle:hover {
    background: #e11d48;
    color: white;
    border-color: #e11d48;
    transform: translateY(-2px);
}

.expand-toggle .icon {
    transition: transform 0.3s ease;
}

.expand-toggle.expanded .icon {
    transform: rotate(180deg);
}

.merchants-footer .btn {
    margin-bottom: 1rem;
}

.merchants-footer p {
    color: #666;
    font-size: 0.95rem;
}

.merchants-footer a {
    color: #e11d48;
    text-decoration: none;
    font-weight: 600;
}

.merchants-footer a:hover {
    text-decoration: underline;
}

.no-results-message {
    text-align: center;
    padding: 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.no-results-message p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Add brand form */
.add-brand-form {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.add-brand-form p {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.brand-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.brand-input:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.brand-list-placeholder {
    background: rgba(225, 29, 72, 0.1);
    border: 2px dashed #e11d48;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #e11d48;
    font-weight: 600;
}

/* Sent message */
.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Disabled button state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.4);
}

@media (max-width: 768px) {
    .brand-input {
        min-width: auto;
    }
    
    .merchants-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .merchant-logo {
        width: 120px;
        height: 120px;
    }
    
    .merchant-item.skeleton {
        width: 120px;
        height: 120px;
    }
    
    .merchant-status {
        width: 10px;
        height: 10px;
    }
}
