/**
 * Menu Manager Styles
 * Follows ads-manager.css pattern for consistency
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Back Button */
.back-button-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.85);
    margin: -40px -20px 20px;
    padding: 20px 20px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #3d3d3d;
    border-color: #4CAF50;
    transform: translateX(-5px);
}

/* Header */
.page-header {
    margin-bottom: 50px;
}

.page-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-header p {
    color: #9e9e9e;
    font-size: 1.05rem;
}

/* Section Container */
.menu-section {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2d2d2d;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    font-size: 2rem;
    color: #4CAF50;
}

.section-title h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    font-weight: 600;
}

/* Branding Form */
.branding-form {
    max-width: 700px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    background: #333;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #9e9e9e;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 16px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    transition: all 0.3s;
}

.radio-option:hover {
    border-color: #4CAF50;
    background: #333;
}

.radio-option input[type="radio"] {
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + span {
    color: #4CAF50;
    font-weight: 600;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #2d2d2d;
    border: 2px dashed #404040;
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-label:hover {
    border-color: #4CAF50;
    background: #333;
}

.file-upload-label i {
    font-size: 1.2rem;
    color: #4CAF50;
}

.current-image {
    margin-top: 15px;
    padding: 15px;
    background: #2d2d2d;
    border-radius: 8px;
}

.current-image img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
}

/* Branding Preview */
.branding-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
}

.preview-logo-icon {
    font-size: 2rem;
    color: #4CAF50;
}

.preview-logo-image {
    max-width: 40px;
    max-height: 40px;
    border-radius: 6px;
}

.preview-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #4CAF50;
    color: #fff;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #404040;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #4d4d4d;
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

.btn-danger:hover {
    background: #da190b;
}

.btn-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    position: relative;
}

.btn-icon:hover {
    border-color: #4CAF50;
    background: #333;
    transform: scale(1.05);
}

.btn-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e;
    color: #4CAF50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn-icon.btn-danger {
    border-color: #404040;
}

.btn-icon.btn-danger:hover {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    transform: scale(1.05);
}

.btn-icon.btn-danger:hover::after {
    color: #f44336;
    border-color: #f44336;
}

/* Menu Items List */
.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 12px;
    transition: all 0.3s;
}

.menu-item-card:hover {
    border-color: #4CAF50;
    transform: translateX(5px);
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    color: #666;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle i {
    font-size: 1.2rem;
}

.menu-item-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
    border: 2px solid #404040;
    border-radius: 10px;
}

.menu-item-icon i {
    font-size: 1.5rem;
    color: #4CAF50;
}

.menu-item-icon img {
    max-width: 30px;
    max-height: 30px;
    border-radius: 4px;
}

.menu-item-content {
    flex: 1;
}

.menu-item-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.menu-item-url {
    font-size: 0.9rem;
    color: #9e9e9e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item-url i {
    font-size: 0.8rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #404040;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #4CAF50;
    font-weight: 600;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 200px;
    justify-content: flex-end;
}

/* Toggle Switch */
.menu-item-toggle {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-item-toggle:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e;
    color: #4CAF50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #404040;
    transition: 0.3s;
    border-radius: 26px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #404040;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.empty-state p {
    color: #9e9e9e;
    font-size: 1rem;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1e1e1e;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal.modal-sm {
    max-width: 450px;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
}

.modal-close {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #2d2d2d;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

/* Menu Item Preview in Modal */
.menu-item-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #2d2d2d;
    border: 2px solid #404040;
    border-radius: 8px;
}

.menu-item-preview i {
    font-size: 1.2rem;
    color: #4CAF50;
}

.menu-item-preview span {
    font-weight: 600;
    color: #fff;
}

/* Delete Warning */
.delete-warning {
    text-align: center;
    padding: 20px;
}

.delete-warning i {
    font-size: 3rem;
    color: #f44336;
    margin-bottom: 20px;
}

.delete-warning p {
    color: #e0e0e0;
    margin-bottom: 10px;
}

.delete-warning strong {
    color: #fff;
    font-size: 1.1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: #f44336;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .menu-section {
        padding: 25px 20px;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .menu-item-card {
        flex-wrap: wrap;
        gap: 15px;
    }

    .menu-item-actions {
        width: 100%;
        justify-content: flex-end;
        min-width: auto;
        gap: 15px;
    }

    .modal {
        width: 95%;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}
