/**
 * Base Styles
 *
 * Core tooltip/info icon styles and base utilities
 * Always loaded on all admin pages
 */

/* ============================================
   Unified Tooltip Icon Styles
   ============================================ */

/* Standard info icon wrapper - supports both .info and .ipb-info-icon */
.info,
.ipb-info-icon {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
}

/* When inside inline-flex labels, reduce margin and align inline */
label[style*="inline-flex"] .info,
label[style*="display:inline-flex"] .info,
label[style*="inline-flex"] .ipb-info-icon,
label[style*="display:inline-flex"] .ipb-info-icon {
    margin-left: 4px;
    vertical-align: baseline;
}

/* Info icon image styling */
.info img,
.ipb-info-icon img {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.info img:hover,
.ipb-info-icon img:hover {
    opacity: 1;
}

/* Tooltip container */
.info .detail,
.info .ipb-info-tooltip,
.ipb-info-icon .ipb-info-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    z-index: 1000;
    margin-bottom: 5px;
    min-width: 150px;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: none;
    line-height: 1.4;
}

/* Tooltip arrow */
.info .detail::after,
.info .ipb-info-tooltip::after,
.ipb-info-icon .ipb-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* FontAwesome icon support for ipb-info-icon */
.ipb-info-icon i.fa-info-circle {
    font-size: 14px;
    color: #646970;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.ipb-info-icon i.fa-info-circle:hover {
    opacity: 1;
    color: #1A73E8;
}

/* Legacy support - maintain existing specific positioning where needed */
.rules .info {
    position: absolute;
    top: -6px;
    right: 0;
}

.rules .info img {
    width: 21px;
    position: absolute;
    right: -35px;
    top: 14px;
}

.input_fields_wrap .info {
    position: absolute;
    right: 16px;
    top: 42px;
}

.input_fields_wrap .info img {
    width: 18px;
}

.trigger_options .info {
    position: static;
}

.trigger_options .info img {
    position: static;
    width: 18px;
}

.limit_fields .info {
    z-index: 9999;
    top: 15%;
    position: absolute;
    right: 0;
}

/* Design page - size fields and z-index: position icons outside inputs */
.size_fields .field_l .info,
.limit_fields .field_l .info:not(label .info) {
    position: absolute !important;
    right: -24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: auto;
}

/* Override absolute positioning when info icon is inside inline-flex label */
.limit_fields label[style*="inline-flex"] .info,
.limit_fields label[style*="display:inline-flex"] .info {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    z-index: auto;
}

.background_field .info {
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
}

/* Action section specific - position icon outside the box */
div#action_toggle .info,
div#action_wrapper .info {
    position: absolute !important;
    right: -24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

div#action .info img {
    top: 0;
}

.input_animate .info {
    position: absolute !important;
    right: -24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.ipb_sound_wrapper .info,
.ipb_sound_wrapper .sound_inputs .info {
    position: absolute !important;
    right: -24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.exit_trigger .info{
    top: -46px;
}

/* Base loader and message styles */
.popup_loader {
    position: fixed;
    left: 0;
    background: #000000ba;
    width: 100%;
    top: 0;
    z-index: 999999999;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
}

.popup_message a {
    color: #2A408B;
}

/* Base typography */
body.ipb-admin-page h1 {
    font-size: 32px;
    margin: 32px 0;
}

body.ipb-admin-page label {
    font-size: 20px;
    line-height: 36px;
    font-weight: 600;
}

td.no-item {
    text-align: center;
    border: none !important;
}

/* Base layout utilities */
.blocker {
    z-index: 9;
}

.instant_inner_wrapper {
    margin-top: 100px;
}

.ipb_wrapper {
    padding: 20px;
    margin: 55px 12px 10px 12px;
}
