/* Placeholder Debug Styles - Individual indicators for each block */

/* Wrapper for placeholder content and indicator */
.placeholder-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

/* Placeholder content area */
.placeholder-content {
    width: 100%;
}

.placeholder-content.placeholder-empty {
    padding: 20px;
    background: rgba(255, 107, 53, 0.05);
    border: 1px dashed rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Individual indicator for each placeholder */
.placeholder-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 107, 53, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 1000;
    opacity: 0.6;
   
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.placeholder-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 107, 53, 0.9);
}

.placeholder-indicator::before {
    content: 'P';
    font-size: 12px;
    font-weight: bold;
    color: white;
}

/* Indicator content (shown on hover) */
.placeholder-indicator-content {
    position: absolute;
    top: 100%;
    right: 0;
 
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
  
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
    z-index: 1001;
}

.placeholder-indicator:hover .placeholder-indicator-content {
    opacity: 1;
    visibility: visible;
}

/* Arrow pointing to indicator */
.placeholder-indicator-content::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
}

/* Status indicators */
.status-active {
    color: #4CAF50;
    font-weight: bold;
}

.status-inactive {
    color: #f44336;
    font-weight: bold;
}

.status-unbound {
    color: #ff9800;
    font-weight: bold;
}

.module-name {
    color: #ff6b35;
    font-style: italic;
}

/* Edit module button styles */
.edit-module-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.edit-module-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.edit-module-btn:active {
    transform: translateY(0);
}

/* Animation for indicator appearance */
@keyframes indicatorPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}


/* Tooltip positioning variants */
.placeholder-tooltip.tooltip-above::before {
    border-bottom-color: rgba(0, 0, 0, 0.8);
}

.placeholder-tooltip.tooltip-above::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.8);
    z-index: -1;
}

.placeholder-tooltip.tooltip-below::before {
    top: auto;
    bottom: -6px;
    border-top: 6px solid rgba(0, 0, 0, 0.8);
    border-bottom: none;
}

.placeholder-tooltip.tooltip-below::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.8);
    z-index: -1;
}

/* Enhanced debug summary table */
.debug-summary-table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
    font-size: 14px;
}

.debug-summary-table th,
.debug-summary-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.debug-summary-table th {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    font-weight: 600;
    border-bottom: 2px solid #e55a2b;
}

.debug-summary-table tr:nth-child(even) {
    background: rgba(255, 107, 53, 0.05);
}

.debug-summary-table tr:hover {
    background: rgba(255, 107, 53, 0.1);
    transition: background 0.2s ease;
}

.debug-summary-table td:first-child {
    font-family: monospace;
    font-weight: bold;
    color: #ff6b35;
}

/* Responsive tooltip positioning */
@media (max-width: 480px) {
    .placeholder-tooltip {
        max-width: 90vw;
        min-width: auto;
        font-size: 12px;
        padding: 10px 12px;
    }

    .placeholder-tooltip::before,
    .placeholder-tooltip::after {
        display: none;
    }
}

/* Context Menu Styles */
.placeholder-context-menu {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item:last-child {
    border-bottom: none;
}

/* Debug Panel Styles */
#placeholder-debug-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 250px;
    background: white;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    font-family: Arial, sans-serif;
}

.debug-panel-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#debug-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.debug-panel-content {
    padding: 15px;
}

.debug-stats {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.debug-actions {
    display: flex;
    gap: 10px;
}

.debug-actions button {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ff6b35;
    background: white;
    color: #ff6b35;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.debug-actions button:hover {
    background: #ff6b35;
    color: white;
}

/* Modal Styles */
.debug-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.debug-modal {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.debug-modal h3 {
    margin-top: 0;
    color: #ff6b35;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
}

.debug-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.debug-summary-table th,
.debug-summary-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.debug-summary-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #ff6b35;
}

.debug-modal-close {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
}

.debug-modal-close:hover {
    background: #e55a2b;
}

/* Notification Styles */
.debug-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10002;
    font-family: Arial, sans-serif;
    font-size: 14px;
    max-width: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .placeholder-debug {
        margin: 3px 0;
        padding: 8px;
    }

    .placeholder-debug-header {
        padding: 6px 10px;
        font-size: 11px;
    }

    .placeholder-debug-content {
        padding: 8px;
    }

    #placeholder-debug-panel {
        width: 200px;
        right: 10px;
        top: 10px;
    }

    .debug-actions {
        flex-direction: column;
    }

    .debug-modal {
        max-width: 95%;
        max-height: 95%;
        padding: 15px;
    }
}
