/* ==========================================================================
   HostCry Modern VPS Order Form (Hostinger-Style OS / Control Panel / Apps)
   ========================================================================== */

/* Hide native dropdown sections once enhanced, keeping selects in DOM for WHMCS/Virtualizor */
.hc-vps-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* Main Picker Panel */
.hc-vps-picker-wrap {
    margin-bottom: 28px;
}

.hc-vps-picker-wrap .section-header {
    margin-bottom: 14px;
}

.hc-vps-picker-wrap .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.hc-vps-picker-subtitle {
    font-size: 13.5px;
    color: #6b7280;
    margin: 0;
}

.hc-vps-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

/* Top Search Bar - Flexbox layout so icon and text NEVER overlap */
.hc-vps-search-box {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    height: 48px !important;
    padding: 0 14px 0 16px !important;
    margin-bottom: 18px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hc-vps-search-box:focus-within {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

.hc-vps-search-icon {
    position: static !important;
    transform: none !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    color: #4b5563 !important;
    pointer-events: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hc-vps-search-icon svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
}

#frmConfigureProduct .hc-vps-search-input,
.hc-vps-search-input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14.5px !important;
    color: #111827 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.hc-vps-search-input::placeholder {
    color: #6b7280 !important;
    opacity: 1;
}

.hc-vps-search-clear {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0 !important;
    border: none !important;
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-radius: 9999px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    padding: 0 !important;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.hc-vps-search-clear:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

/* Category Tabs Row: Plain OS | Control panel | Applications */
.hc-vps-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.hc-vps-tab {
    appearance: none;
    border: none !important;
    background: #f3f4f6 !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    padding: 10px 20px !important;
    border-radius: 9999px !important;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: none !important;
}

.hc-vps-tab:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

.hc-vps-tab.is-active {
    background: #111827 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Sub-filter Dropdown Bar (All (..)) */
.hc-vps-subfilter-row {
    margin-bottom: 16px;
    display: none;
}

.hc-vps-subfilter-row.is-visible {
    display: block;
}

.hc-vps-subfilter-select-wrap {
    position: relative;
}

#frmConfigureProduct .hc-vps-subfilter-select,
.hc-vps-subfilter-select {
    width: 100% !important;
    height: 46px !important;
    padding: 0 42px 0 16px !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: #111827 !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
}

#frmConfigureProduct .hc-vps-subfilter-select:focus,
.hc-vps-subfilter-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

.hc-vps-subfilter-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #111827;
    display: flex;
    align-items: center;
}

/* 2-Column Card Grid */
.hc-vps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 640px) {
    .hc-vps-grid {
        grid-template-columns: 1fr;
    }
    .hc-vps-panel {
        padding: 16px;
    }
}

/* Individual Card */
.hc-vps-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 13px 16px;
    background: #ffffff;
    border: 1px solid #d9dce3;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.hc-vps-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.07);
}

.hc-vps-card.is-selected {
    border: 1.5px solid #6366f1;
    background: #f8f7ff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1);
}

.hc-vps-card-left {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    flex: 1;
}

.hc-vps-card-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-vps-card-icon img,
.hc-vps-card-icon svg {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

/* Small circular Docker overlay badge in bottom-right of app icon */
.hc-vps-docker-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 17px;
    height: 17px;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.hc-vps-docker-badge svg {
    width: 11px !important;
    height: 11px !important;
}

.hc-vps-card-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hc-vps-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.hc-vps-card.is-selected .hc-vps-card-title {
    color: #5025d1;
    font-weight: 600;
}

.hc-vps-card-meta {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.2;
    margin-top: 2px;
}

.hc-vps-card-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Clean Segmented Version Pills on Plain OS Cards (Replaces native <select> box) */
.hc-vps-ver-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f3f4f6;
    padding: 3px;
    border-radius: 9px;
    border: 1px solid #e5e7eb;
}

.hc-vps-card.is-selected .hc-vps-ver-pills {
    background: #ede9fe;
    border-color: #ddd6fe;
}

.hc-vps-ver-pill {
    appearance: none;
    border: none !important;
    background: transparent !important;
    color: #4b5563 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 6px 9px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.14s ease;
    box-shadow: none !important;
}

.hc-vps-ver-pill:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #111827 !important;
}

.hc-vps-ver-pill.is-active-ver {
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
}

.hc-vps-card.is-selected .hc-vps-ver-pill.is-active-ver {
    background: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3) !important;
}

/* Subtle Check Indicator for Selected Control Panel / Application Card */
.hc-vps-check-badge {
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: #ede9fe;
    color: #5025d1;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hc-vps-card.is-selected .hc-vps-check-badge {
    display: inline-flex;
}

.hc-vps-check-badge svg {
    width: 14px;
    height: 14px;
}

/* Show more / Show less toggle */
.hc-vps-toggle-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.hc-vps-toggle-more-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #5025d1;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hc-vps-toggle-more-btn:hover {
    background: #f5f3ff;
    color: #4318b8;
}

/* Base OS Strip when a Control Panel or Application is selected */
.hc-vps-base-os-bar {
    margin-top: 18px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hc-vps-base-os-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #334155;
}

.hc-vps-base-os-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #6366f1;
    flex-shrink: 0;
}

.hc-vps-base-os-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hc-vps-base-os-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.hc-vps-base-os-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#frmConfigureProduct .hc-vps-base-os-select,
.hc-vps-base-os-select {
    height: 36px !important;
    padding: 0 32px 0 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
}

.hc-vps-base-os-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #475569;
    display: flex;
    align-items: center;
}

/* Empty search state */
.hc-vps-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 16px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}

/* Product Spec Pills in Top Card (.product-config-info) */
.hc-vps-spec-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hc-vps-spec-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.hc-vps-spec-pill svg {
    width: 14px;
    height: 14px;
    color: #6366f1;
    flex-shrink: 0;
}

/* Server Configuration Helper Buttons (Password Generator & Eye Toggle) */
.hc-vps-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hc-vps-pw-wrap input.form-control {
    padding-right: 112px !important;
}

.hc-vps-pw-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-vps-pw-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.15s ease;
}

.hc-vps-pw-btn:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #4f46e5;
}
