/* ==============================================
   Custom Info Component Styles
   ============================================== */

/* Section */
.custom-info-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.custom-info-section .section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.custom-info-section .section-header h3 {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.custom-info-section .section-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-info-section .section-icon.custom-info {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.custom-info-section .section-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn-add-custom-info {
    padding: 6px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-custom-info:hover {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.btn-add-custom-info svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* List */
.custom-info-list {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 400px;
    overflow-y: auto;
}

.custom-info-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-tertiary);
    font-size: 13px;
}

.custom-info-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    text-align: center;
}

.custom-info-empty p {
    color: var(--text-tertiary);
    font-size: 13px;
    margin: 0;
}

/* Info Item */
.custom-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.custom-info-item:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
}

.custom-info-item.pinned {
    border-color: var(--warning);
    background: rgba(251, 191, 36, 0.05);
}

.custom-info-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: currentColor;
    background: rgba(currentColor, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.custom-info-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.custom-info-content {
    flex: 1;
    min-width: 0;
}

.custom-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-info-value {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.custom-info-value.multiline {
    white-space: pre-wrap;
}

.custom-info-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.custom-info-link:hover {
    text-decoration: underline;
}

.custom-info-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xs);
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Actions */
.custom-info-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-info-item:hover .custom-info-actions {
    opacity: 1;
}

.custom-info-actions .btn-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-info-actions .btn-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 2;
}

.custom-info-actions .btn-icon:hover {
    background: var(--bg-input);
}

.custom-info-actions .btn-pin:hover,
.custom-info-actions .btn-pin.active {
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--warning);
}

.custom-info-actions .btn-pin:hover svg,
.custom-info-actions .btn-pin.active svg {
    stroke: var(--warning);
}

.custom-info-actions .btn-edit:hover {
    background: rgba(0, 122, 255, 0.15);
    border-color: var(--accent);
}

.custom-info-actions .btn-edit:hover svg {
    stroke: var(--accent);
}

.custom-info-actions .btn-delete:hover {
    background: rgba(255, 69, 58, 0.15);
    border-color: var(--danger);
}

.custom-info-actions .btn-delete:hover svg {
    stroke: var(--danger);
}

/* Modal */
.custom-info-modal {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.custom-info-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.custom-info-modal .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-info-modal .form-select,
.custom-info-modal .form-input,
.custom-info-modal .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.custom-info-modal .form-select:focus,
.custom-info-modal .form-input:focus,
.custom-info-modal .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.custom-info-modal .form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Slider */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-input);
    outline: none;
    -webkit-appearance: none;
}

.form-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-tertiary);
}

.slider-value {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* Input with suffix */
.input-with-suffix {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.input-with-suffix .form-input {
    flex: 1;
}

.input-suffix {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--success);
}

/* Custom Info Wrapper in player detail */
.custom-info-wrapper {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.custom-info-wrapper .custom-info-section {
    background: var(--bg-input);
    border: 1px solid var(--border);
}

/* Dark mode adjustments */
[data-theme="dark"] .custom-info-item {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .custom-info-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Light mode adjustments */
[data-theme="light"] .custom-info-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

[data-theme="light"] .custom-info-item {
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

[data-theme="light"] .custom-info-item:hover {
    background: var(--bg-secondary);
}
