/* Spacing & Margin Preview Tool Styles */

/* Spacing Preview Container */
.spacing-preview-container {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 300px;
}

/* Parent and Target Elements */
.parent-element {
    background-color: #e9ecef;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.target-element {
    background-color: #0d6efd;
    color: white;
    padding: 20px;
    text-align: center;
    width: 200px;
    position: relative;
    z-index: 2;
}

/* Visual Guide */
.visual-guide {
    position: relative;
    min-height: 100px;
    background-color: #f8f9fa;
    padding: 15px;
}

.guide-container {
    position: relative;
    margin: 20px 0;
}

.guide-box {
    position: relative;
    background-color: white;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 10px;
}

.guide-label {
    position: absolute;
    font-size: 0.75rem;
    font-weight: bold;
    color: #495057;
    background-color: white;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 3;
}

/* Spacing Indicators */
.margin-indicator {
    position: absolute;
    background-color: rgba(255, 193, 7, 0.3);
    border: 1px dashed #ffc107;
}

.padding-indicator {
    position: absolute;
    background-color: rgba(13, 110, 253, 0.3);
    border: 1px dashed #0d6efd;
}

.gap-indicator {
    background-color: rgba(25, 135, 84, 0.3);
    border: 1px dashed #198754;
}

/* Direction Labels */
.direction-label {
    position: absolute;
    font-size: 0.7rem;
    font-weight: bold;
    color: #212529;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1px 4px;
    border-radius: 2px;
    z-index: 4;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .spacing-preview-container {
        min-height: 200px;
    }
    
    .target-element {
        width: 150px;
        padding: 15px;
    }
}

/* Animation for copy buttons */
@keyframes flash {
    0% { background-color: transparent; }
    50% { background-color: rgba(25, 135, 84, 0.2); }
    100% { background-color: transparent; }
}

.copied {
    animation: flash 1s;
}