/**
 * Lanyards Colors Selection Styles
 *
 * @package LanyardsAPI
 * @version 1.0.0
 */

/* ============================================
   COLORS SECTION CONTAINER
   ============================================ */

.lanyards-colors-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.lanyards-colors-section:hover {
    background: #ffffff;
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================
   LABEL
   ============================================ */

.lanyards-colors-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lanyards-colors-label .lanyards-label-text {
    display: inline-block;
}

.lanyards-colors-label .lanyards-required-indicator {
    color: #e74c3c;
    margin-left: 4px;
    font-size: 18px;
}

/* ============================================
   SELECT WRAPPER
   ============================================ */

.lanyards-colors-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.lanyards-colors-select-wrapper .lanyards-select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* ============================================
   SELECT ELEMENT
   ============================================ */

.lanyards-colors-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    opacity: 1;
}

/* iOS Safari fix for invisible text */
.lanyards-colors-select option {
    color: #333;
    background: #fff;
    font-size: 16px;
    padding: 10px;
}

.lanyards-colors-select:hover {
    border-color: #bbb;
}

.lanyards-colors-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.lanyards-colors-select:focus + .lanyards-select-arrow {
    border-top-color: #3498db;
    transform: translateY(-50%) rotate(180deg);
}

/* Disabled state */
.lanyards-colors-select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Placeholder option styling */
.lanyards-colors-select option[value=""] {
    color: #999;
    font-style: italic;
}

.lanyards-colors-select option:not([value=""]) {
    color: #333;
    font-style: normal;
}

/* ============================================
   ERROR STATE
   ============================================ */

.lanyards-colors-select.lanyards-error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.lanyards-colors-select.lanyards-error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.lanyards-error-message {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #e74c3c;
    background: #fff5f5;
    border-left: 3px solid #e74c3c;
    border-radius: 4px;
    animation: slideIn 0.3s ease;
}

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

/* ============================================
   DESCRIPTION TEXT
   ============================================ */

.lanyards-colors-description {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
    .lanyards-colors-section {
        padding: 15px;
        margin: 15px 0;
    }

    .lanyards-colors-label {
        font-size: 15px;
    }

    .lanyards-colors-select-wrapper {
        max-width: 100%;
    }

    .lanyards-colors-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 40px 14px 12px;
    }

    .lanyards-colors-description {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .lanyards-colors-section {
        padding: 12px;
        margin: 12px 0;
    }

    .lanyards-colors-label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .lanyards-colors-select {
        padding: 12px 35px 12px 10px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .lanyards-colors-section {
        border: 1px solid #ccc;
        background: #fff;
        box-shadow: none;
    }

    .lanyards-select-arrow {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible for keyboard navigation */
.lanyards-colors-select:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lanyards-colors-select {
        border-width: 3px;
    }

    .lanyards-colors-label {
        font-weight: 700;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .lanyards-colors-section,
    .lanyards-colors-select,
    .lanyards-select-arrow,
    .lanyards-error-message {
        transition: none;
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lanyards-colors-section {
        background: #2c2c2c;
        border-color: #444;
    }

    .lanyards-colors-section:hover {
        background: #333;
        border-color: #555;
    }

    .lanyards-colors-label {
        color: #e0e0e0;
    }

    .lanyards-colors-select {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #555;
    }

    .lanyards-colors-select option {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .lanyards-colors-select:hover {
        border-color: #666;
    }

    .lanyards-colors-select:focus {
        border-color: #5dade2;
    }

    .lanyards-colors-description {
        color: #aaa;
    }

    .lanyards-select-arrow {
        border-top-color: #aaa;
    }

    .lanyards-colors-select.lanyards-error {
        background: #3a1f1f;
        border-color: #e74c3c;
    }

    .lanyards-error-message {
        background: #3a1f1f;
        color: #ff6b6b;
    }
}
