/**
 * Store Stock Availability Plugin Styles
 * Version: 1.0.0
 */

/* Main button styling */
.store-availability-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.store-availability-button:hover {
    background: #f8f9fa;
    border-color: #999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.store-availability-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Chevron icon */
.chevron-icon {
    margin-left: auto;
    padding-left: 10px;
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #666;
}

.store-availability-button:hover .chevron-icon {
    transform: translateY(1px);
}

/* Dropdown container */
.store-availability-dropdown {
    position: absolute;
    background: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 100%;
    max-width: 300px;
    margin-top: -1px;
    overflow: hidden;
}

/* Dropdown items */
.store-availability-dropdown label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
}

.store-availability-dropdown label:last-child {
    border-bottom: none;
}

.store-availability-dropdown label:hover {
    background: #f8f9fa;
}

.store-availability-dropdown label:active {
    background: #e9ecef;
}

/* Radio buttons */
.store-availability-dropdown input[type="radio"] {
    margin: 0 10px 0 0;
    cursor: pointer;
}

/* Stock indicators */
.stock-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.stock-green {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.stock-yellow {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.stock-black {
    background-color: #6c757d;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

/* Availability text */
.availability-text {
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    flex: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .store-availability-button,
    .store-availability-dropdown {
        max-width: 100%;
    }
    
    .store-availability-button {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .store-availability-dropdown label {
        padding: 14px 16px;
    }
    
    .availability-text {
        font-size: 16px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .store-availability-button {
        background: #2a2a2a;
        border-color: #444;
        color: #f0f0f0;
    }
    
    .store-availability-button:hover {
        background: #333;
        border-color: #666;
    }
    
    .store-availability-dropdown {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .store-availability-dropdown label {
        border-bottom-color: #444;
    }
    
    .store-availability-dropdown label:hover {
        background: #333;
    }
    
    .availability-text {
        color: #f0f0f0;
    }
    
    .chevron-icon {
        color: #ccc;
    }
}

/* Animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.store-availability-dropdown {
    animation: slideDown 0.2s ease-out;
}

/* Loading state */
.availability-text.loading {
    opacity: 0.6;
    font-style: italic;
}