/* Hooma Ads Styles */
.hooma-ad-container {
    display: block;
    max-width: 100%;
}

.hooma-ad-container img {
    max-width: 100%;
    height: auto;
}

/* Frontend Slider */
.hooma-ad-gallery {
    display: grid;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hooma-ad-item {
    grid-area: 1 / 1;
    /* Force all items to occupy the same space */
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.hooma-ad-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    /* Ensure active item is on top */
}

.hooma-ad-item img {
    display: block;
    position: relative;
    top: 50%;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto !important;
    transform: translateY(-50%);
}


/* Admin Gallery Styles */
.hooma-ads-gallery-wrapper {
    margin-top: 10px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 4px;
}

.hooma-ads-gallery-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 20px;
}

.hooma-ads-gallery-item {
    width: 100px;
    height: 100px;
    position: relative;
    border: 1px solid #ccc;
    cursor: move;
    /* If sortable */
}

.hooma-ads-gallery-thumb {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hooma-ads-gallery-actions {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: flex-end;
    padding: 2px;
}

.hooma-ads-gallery-item:hover .hooma-ads-gallery-actions {
    display: flex;
}

.hooma-ads-gallery-actions button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 2px;
    margin: 0 2px;
}

.hooma-ads-gallery-actions button:hover {
    color: #00a0d2;
}

.hooma-ads-gallery-actions button:hover {
    color: #00a0d2;
}

.hooma-ads-gallery-actions-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: space-between;
    padding: 2px;
}

.hooma-ads-gallery-item:hover .hooma-ads-gallery-actions-bottom {
    display: flex;
}

.hooma-ads-gallery-actions-bottom button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 2px;
}

.hooma-ads-gallery-actions-bottom button:hover {
    color: #00a0d2;
}

/* Modal Styles */
.hooma-modal {
    position: fixed;
    z-index: 100000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hooma-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.hooma-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 400px;
    max-width: 90%;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.hooma-modal-header {
    background: #f3f3f3;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hooma-modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.hooma-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.hooma-modal-body {
    padding: 15px;
}

.hooma-modal-body p {
    margin-bottom: 15px;
}

.hooma-modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.hooma-modal-footer {
    background: #f3f3f3;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* Tooltip Styles (Moved from admin-fields.php) */
.hooma-tooltip {
    position: relative;
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
}

.hooma-tooltip-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #64748b;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    cursor: help;
}

.hooma-tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.hooma-tooltip:hover .hooma-tooltip-content {
    opacity: 1;
    visibility: visible;
}

.hooma-tooltip-content code {
    background: rgba(255, 255, 255, 0.1);
    color: #93c5fd;
}