/*
 * Selectable Cards Component
 * Based on .phpagenterules.md
 */

.selectable-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 10px;
    border-radius: 12px;
    border: 1px solid rgba(var(--white-rgb), 0.1);
    background: rgba(var(--white-rgb), 0.02);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    user-select: none;
}

.selectable-card:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
}

.selectable-card.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.1);
}

.selectable-card i {
    width: 20px;
    height: 20px;
    color: rgba(var(--white-rgb), 0.5);
    transition: all 0.3s ease;
}

.selectable-card.active i {
    color: var(--primary);
}

.selectable-card span {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.selectable-card.active span {
    color: var(--primary) !important;
}

/* Hidden input fallback */
.selectable-card input[type="checkbox"] {
    display: none !important;
}
/* --- Theme Selection Grid --- */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.theme-card-label {
    cursor: pointer;
    position: relative;
}

.theme-card-ui {
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-card-label input:checked + .theme-card-ui {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    box-shadow: 0 8px 25px rgba(var(--black-rgb),0.2);
}

.theme-card-preview {
    height: 80px;
    border-radius: 10px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--white-rgb), 0.05);
}

/* Companies Style Theme Preview */
.theme-preview-box {
    height: 80px;
    background: var(--preview-bg, #000);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.theme-center-dot {
    width: 32px;
    height: 32px;
    background: var(--preview-accent, var(--primary));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--preview-accent, var(--primary));
}

.theme-card-accent {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-card-subaccent {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 60px;
    height: 4px;
    background: rgba(var(--white-rgb),0.1);
    border-radius: 2px;
}

.theme-card-name, .theme-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.theme-check-icon, .theme-status-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition);
    z-index: 5;
}

.theme-card-label input:checked + .theme-card-ui .theme-check-icon,
.selectable-card.active .theme-status-icon {
    opacity: 1;
    transform: scale(1);
}
