/* =====================================================
   WSPÓLNE STYLE DLA BOOST OPTIONS
   Używane w: boost_options.blade.php,
              boost_options_integer.blade.php,
              boost_options_range.blade.php
   ===================================================== */

/* Grid Layout */
.boost-config-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.boost-config-content {
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Rank Row - dla 2 kolumn (current/desired) */
.rank-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Rank Selector - wspólny dla wszystkich typów */
.rank-selector {
    position: relative;
}

.rank-selector-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white-color);
}

.rank-selector-title i {
    font-size: 1.2rem;
}

.rank-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Rank Image - ikona rangi */
.rank-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.rank-image-placeholder {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-transparent-03);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.rank-image-placeholder i {
    font-size: 2rem;
    color: var(--accent-color, #ffd700);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Rank Input Container */
.rank-input-container {
    flex: 1;
    min-width: 0;
}

/* Rank Select - dla categorical (boost_options.blade.php) */
.rank-select-wrapper {
    position: relative;
}

.rank-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    background-size: 12px 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--white-color, #fff);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    padding-right: 3rem;
}

.rank-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.rank-select:focus,
.rank-select:active {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color, #ffd700);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.rank-select option {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem;
}

/* Rank Input - dla range (boost_options_range.blade.php) */
.rank-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--white-color, #fff);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1rem;
}

.rank-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.rank-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color, #ffd700);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

/* Slider Container - dla range */
.slider-container {
    margin-top: 1rem;
}

.rank-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.rank-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color, #ffd700), var(--secondary-color, #4f46e5));
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.rank-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color, #ffd700), var(--secondary-color, #4f46e5));
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.6);
}

/* Order Box Container */
.order-box-container {
    position: sticky;
    top: 2rem;
    align-self: start;
}

/* Fade In Animation */
.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Tablet (1024px i mniej) */
@media (max-width: 1024px) {
    .boost-config-grid {
        grid-template-columns: 1fr 350px;
        gap: 2rem;
    }

    .boost-config-content {
        padding: 1.75rem;
    }

    .rank-row {
        gap: 1.5rem;
    }
}

/* Mobile (768px i mniej) */
@media (max-width: 768px) {
    .boost-config-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .boost-config-content {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .rank-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .rank-input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .rank-image,
    .rank-image-placeholder {
        width: 64px;
        height: 64px;
        align-self: center;
    }

    .rank-image-placeholder i {
        font-size: 1.5rem;
    }

    .rank-input-container {
        width: 100%;
    }

    .rank-selector-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .rank-select,
    .rank-input {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .order-box-container {
        position: static;
        top: auto;
    }
}

/* Small Mobile (480px i mniej) */
@media (max-width: 480px) {
    .boost-config-content {
        padding: 1rem;
        border-radius: 12px;
    }

    .rank-selector-title {
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    .rank-select,
    .rank-input {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .rank-image,
    .rank-image-placeholder {
        width: 56px;
        height: 56px;
    }
}

/* =====================================================
   SELECT2 STYLING - Dark Theme
   ===================================================== */

/* Hide native select when Select2 is active */
.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

/* Container */
.select2-container {
    width: 100% !important;
}

/* Selection (closed state) */
.select2-container--default .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    height: auto;
    min-height: 56px;
    padding: 0.875rem 1rem;
    padding-right: 2.5rem;
    color: var(--white-color, #fff) !important;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Rendered text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--white-color, #fff) !important;
    line-height: 1.5;
    padding: 0;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Arrow - using SVG icon */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    position: absolute;
    top: 0;
    right: 1rem;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow::before {
    content: '';
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

/* Open state */
.select2-container--default.select2-container--open .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    outline: none;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::before {
    transform: rotate(180deg);
}

/* Dropdown */
.select2-dropdown {
    background-color: #1e1e3f !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Search field */
.select2-container--default .select2-search--dropdown {
    padding: 0.75rem;
    background: #1e1e3f !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    color: var(--white-color, #fff) !important;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    outline: none;
    width: 100%;
}

.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Results container */
.select2-results {
    background: #1e1e3f !important;
}

.select2-results__options {
    max-height: 280px;
    overflow-y: auto;
}

/* Options */
.select2-container--default .select2-results__option {
    color: var(--white-color, #fff) !important;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: transparent !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--white-color, #fff) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--white-color, #fff) !important;
}

.select2-container--default .select2-results__option--disabled {
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed;
}

/* No results message */
.select2-container--default .select2-results__option.select2-results__message {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.9375rem;
    background: transparent !important;
}

/* Scrollbar styling for dropdown */
.select2-results__options::-webkit-scrollbar {
    width: 6px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments for Select2 */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        min-height: 52px;
        padding: 0.75rem 0.875rem;
        padding-right: 2.25rem;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 0.9375rem;
    }

    .select2-container--default .select2-results__option {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
    }

    .select2-container--default .select2-search--dropdown .select2-search__field {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .select2-container--default .select2-selection--single {
        min-height: 48px;
        padding: 0.625rem 0.75rem;
        padding-right: 2rem;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        font-size: 0.875rem;
    }

    .select2-container--default .select2-results__option {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .select2-results__options {
        max-height: 240px;
    }
}

