/* Demo / Edit Mode Styles */
body.demo-mode {
    padding-bottom: 80px; /* Space for toolbar */
}

/* --- Floating Toolbar --- */
#demo-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    background: rgba(22, 22, 37, 0.95); /* Dark background */
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 900; /* Lower than modal (usually 1000) */
    border: 1px solid rgba(255,255,255,0.1);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.demo-toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

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

.btn-demo-action, .btn-demo-primary {
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-demo-action {
    background: rgba(255,255,255,0.1);
    color: white;
}

.btn-demo-primary {
    background: #E23E57;
    color: white;
    box-shadow: 0 4px 15px rgba(226, 62, 87, 0.4);
}

.btn-demo-action:hover, .btn-demo-primary:hover {
    transform: scale(1.05);
}

/* --- Header Edit Button --- */
.header-edit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5); /* Dark translucent background */
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border */
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff; /* White text */
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-edit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    background: rgba(0, 0, 0, 0.7);
}
.header-edit-btn i {
    color: #fff; /* White icon to match text */
}

@media (max-width: 768px) {
    .header-edit-btn span {
        display: none;
    }
    .header-edit-btn {
        padding: 0;
        width: 40px; /* Tamaño del botón circular */
        height: 40px;
        justify-content: center;
        border-radius: 50%;
    }
}

/* --- Edit Overlays & Icons --- */
.demo-editable {
    position: relative;
    outline: 2px dashed transparent;
    transition: outline 0.2s;
    cursor: text;
}
.demo-editable:hover, .demo-editable:focus {
    outline: 2px dashed rgba(226, 62, 87, 0.5);
    background: rgba(226, 62, 87, 0.05);
    border-radius: 4px;
}

/* Image Upload Overlays */
.profile-header-image-container {
    position: relative;
}
/* Legacy .demo-edit-overlay styles kept for Avatar only */
.demo-edit-overlay {
    position: absolute;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%; /* Default circular for avatar */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 20;
}
.demo-edit-overlay:hover {
    opacity: 1;
    background: rgba(226, 62, 87, 0.8);
}

/* Avatar Overlay Specifics */
.circle-avatar-overlay .demo-edit-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
}
.circle-avatar-overlay:hover .demo-edit-overlay {
    opacity: 1;
}

/* Text Edit Icons */
.demo-edit-icon {
    font-size: 0.9rem;
    color: #E23E57;
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.7;
    vertical-align: middle;
}
.demo-edit-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* --- Horizontal Edit Controls Group --- */
.link-edit-controls, .social-edit-controls {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    gap: 5px; /* Spacing between buttons */
    z-index: 20;
    background: rgba(255, 255, 255, 0.8); /* Optional background pill? No, clean buttons */
    border-radius: 20px;
    padding: 2px;
}

/* Control Buttons (Edit & Delete) */
.demo-edit-btn, .demo-delete-btn {
    width: 30px; /* Slightly larger touch target */
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    position: static; /* Override any absolute legacy */
    margin: 0;
}

.demo-edit-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.demo-delete-btn {
    background: #E23E57;
    color: white;
    border: none;
}

.demo-edit-btn:hover, .demo-delete-btn:hover {
    transform: scale(1.1);
}

/* Legacy standalone delete button support (e.g. Gallery, Events) */
.demo-delete-btn-gallery,
.event-card > .demo-delete-btn,
.gallery-photo-item > .demo-delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    margin: 0;
}


.event-card { position: relative; }
.gallery-photo-item { position: relative; }

/* Empty States / Add Buttons */
.demo-add-btn {
    display: block;
    width: 100%;
    max-width: 90%; /* Prevent hitting edges */
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    margin-top: 10px;
    background: rgba(0,0,0,0.03);
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: 12px;
    color: #666;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.demo-add-btn:hover {
    background: rgba(226, 62, 87, 0.05);
    border-color: #E23E57;
    color: #E23E57;
}

/* Color Picker Modal */
#color-picker-modal {
    display: none; /* Hidden by default */
}

/* Content Editable Empty State */
[contenteditable]:empty::before {
    content: attr(placeholder);
    color: #aaa;
}

/* Force avatar overlay visibility on mobile */
@media (max-width: 768px) {
    .circle-avatar-overlay .demo-edit-overlay {
        opacity: 1;
    }
}

/* Force 16px on mobile to prevent zoom */
@media screen and (max-width: 768px) {
    input, select, textarea, .form-control {
        font-size: 16px !important;
    }
}

.demo-add-social-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px dashed #E23E57;
    background: rgba(226, 62, 87, 0.1);
    color: #E23E57;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 10px;
    transition: all 0.2s;
}
.demo-add-social-btn:hover {
    background: #E23E57;
    color: white;
    transform: scale(1.1);
}
