/* --- Styles for Edit Forms (Flipbook, User, etc.) --- */
/* NO @import needed here anymore */

main.container {
    max-width: 900px; /* Give the form a little more width */
    padding: 0 1rem;
    margin: 2rem auto;
}

.form-container {
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    
    /* --- NEW BACKGROUND STYLES --- */
    background-color: #fff;
    background-image: url('../../webimages/paperbg.jpg'); 
    background-repeat: repeat;
    background-attachment: contain;
    
}

.form-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.form-header h1 { margin: 0; }

.form-header a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.form-header a:hover { text-decoration: underline; }

.form-description {
    font-size: 1rem;
    color: #555;
    margin-top: -10px; /* Adjust if too close to the header */
    margin-bottom: 25px; /* Space before the form fieldset */
    text-align: center; /* Center the description if desired */
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

fieldset legend {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0;
}

.form-description {
    font-size: 1rem;
    color: #555;
    margin-top: -10px; /* Adjust if too close to the header */
    margin-bottom: 25px; /* Space before the form fieldset */
    text-align: center; /* Center the description if desired */
}

/* Unified style for all text inputs using our new class */
.text-input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Add a nice focus effect for better UX */
.text-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* A specific rule just for textareas */
textarea.text-input {
    resize: vertical; /* Allow vertical resizing only on textareas */
    min-height: 80px; /* Minimum height */
}

.label-note {
    font-weight: normal; /* Makes it less bold than the main label */
    font-size: 0.85rem;
    color: #555;
    margin-left: 0.5rem;
}

.message { 
    padding: 1rem; 
    margin-bottom: 1.5rem; /* Add some margin to space it from the form */
    border-radius: 5px; 
    text-align: center; 
    border: 1px solid transparent;
}
.error { 
    color: #721c24; 
    background-color: #f8d7da; 
    border-color: #f5c6cb; 
}
.success { 
    color: #155724; 
    background-color: #d4edda; 
    border-color: #c3e6cb; 
}

.btn {
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background-color: #28a745;
    color: white;
}
.btn-primary:hover {
    background-color: #218838;
}
.btn-secondary {
    background-color: transparent;
    color: #f97316;
    border: 1px solid #f97316;
}
.btn-secondary:hover {
    background-color: #ea580c;
    color: white;
}
/* --- START: NEW BRAND BLUE BUTTON STYLE --- */
.btn.btn-brandblue {
    background-color: #3b82f6; /* Your brand blue */
    color: #ffffff;
    border-color: #3b82f6; /* Make border the same color */
}

.btn.btn-brandblue:hover {
    background-color: #2563eb; /* A slightly darker shade for hover */
    border-color: #2563eb;
    color: #ffffff;
}
/* --- END: NEW BRAND BLUE BUTTON STYLE --- */

/* ============================================= */
/*   MODIFIED CELEBRATION STYLE                  */
/* ============================================= */
.message.celebration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* A little more space */
    text-align: left; /* Text within the container will be left-aligned */
    padding: 1.5rem; /* Add some padding */

    /* Your existing styles are great */
    background-color: #e6ffed;
    border-color: #34d399;
    color: #065f46;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.2);
}

/* Style for the icon inside ANY celebration message */
.message.celebration .message-icon {
    /* Use max-width for the awesome.png and max-height for oksuccess.png */
    max-width: 150px; 
    max-height: 100px;
    height: auto;
    flex-shrink: 0;
}

/* NEW: This div wraps all the text content */
.message.celebration .message-text-content {
    /* The text inside this div can still be centered if desired */
    text-align: center; 
}

.message.celebration .message-text-content strong {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 0.25rem;
}

/* --- NEW: Orange Theme Override for Advanced Editor Page --- */

/* Use the body ID to make this rule highly specific */
#advanced-editor-page .message.celebration {
    background-color: #fff7ed; /* Very light orange */
    border-color: #fed7aa;     /* A soft, warm orange border */
    color: #9a3412;            /* A deep, rich orange for the text */
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.2); /* Orange shadow */
}

#advanced-editor-page .message.celebration strong {
    color: #f97316; /* Vibrant orange for the "Success!" text */
}

/* (2) Style for the character limit note */
.char-limit-note {
    font-size: 0.8rem;
    color: #777;
    text-align: right;
    margin-top: 0.25rem;
}

/* (3) Styles for the new privacy option layout */
.privacy-options label {
    font-weight: normal;
    display: flex; /* Aligns radio button and text block */
    align-items: flex-start; /* Aligns to the top */
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}
.privacy-options input[type="radio"] {
    margin: 0;
    margin-top: 0.2rem; /* A tiny adjustment for perfect alignment */
    flex-shrink: 0;
}
.privacy-text {
    display: flex;
    flex-direction: column; /* Stacks "Public" and the description vertically */
}
.privacy-text strong {
    font-weight: 600;
    color: #333;
}
.privacy-text span {
    font-size: 0.9rem;
    color: #555;
}

.privacy-text span {
    font-size: 0.9rem;
    color: #555;
}

/* (4) Styles for the Pro Tip Box */
.pro-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}
.pro-tip-icon { font-size: 1.2rem; }
.pro-tip-text { font-size: 0.85rem; color: #374151; line-height: 1.5; }
.pro-tip-text a { font-weight: bold; }

/* ======================================================= */
/* --- ORANGE THEME OVERRIDE FOR ADVANCED EDITOR ACTIVE TAB --- */
/* ======================================================= */

#advanced-editor-page .tab-link.active {
    background-color: #fff7ed !important; /* Pale Orange */
    color: #9a3412 !important; /* Deep Orange Text */
    font-weight: 600;
}

/* =================================================================== */
/* --- ORANGE THEME OVERRIDE FOR BRAND KIT EDITOR PAGE --- */
/* =================================================================== */

/* 
  By using the body ID, these rules become highly specific and will
  override the default green .step-container styles on this page only.
*/

/* 1. Style the header of each step box */
#brand-kit-editor-page .step-header {
    background-color: #fff7ed; /* Very light orange */
    border-bottom-color: #ffedd5; /* Soft orange */
}

/* 2. Style the step number circle */
#brand-kit-editor-page .step-number {
    background-color: #f97316; /* Vibrant orange */
}

/* 3. Style the step title text */
#brand-kit-editor-page .step-title {
    color: #9a3412; /* Deep, rich orange */
}

/* 4. Style the main "Save Brand Kit" button */
#brand-kit-editor-page .save-btn {
    background-color: #f97316;
    color: white;
}
#brand-kit-editor-page .save-btn:hover {
    background-color: #ea580c;
}

/* --- NEW: Styles for Shareable URL Container within Privacy Options --- */
.shareable-url-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef2f6; /* A soft separator line */
}

.shareable-url-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #065f46;
    font-size: 1rem; /* Match other form labels */
}

/* Add a background color to the readonly input to differentiate it */
.share-link-wrapper .text-input[readonly] {
    background-color: #f8f9fa;
}

/* ==================================================== */
/* --- STYLES FOR "VIEW LIVE" LINK IN EDITOR HEADER --- */
/* ==================================================== */

.editor-title-with-link {
    display: flex;
    align-items: center;
    justify-content: space-between; /* This can also be flex-start */
    gap: 1rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.view-live-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    
    /* --- NEW ORANGE THEME --- */
    background-color: #fffaf0; /* Pale Orange */
    color: #9a3412; /* Dark Orange text */
    border: 1px solid #fed7aa; /* Soft Orange border */
    
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    padding: 8px 15px;
    transition: all 0.2s ease-in-out;
}

.view-live-link:hover {
    background-color: #ffedd5; /* Slightly darker pale orange */
    color: #7c2d12; /* Deeper orange text */
    border-color: #fdbf72;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.view-live-link svg {
    width: 18px;
    height: 18px;
}

/* ============================================= */
/* --- STYLES FOR ON-PAGE QR CODE DISPLAY      --- */
/* ============================================= */

.qr-code-generator-wrapper {
    margin-top: 1.2rem; /* Adds about 24px of space above the button */
}

.qr-code-display-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef2f6; /* Soft separator line */
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.qr-code-image {
    flex-shrink: 0;
}

.qr-code-image img {
    width: 120px;
    height: 120px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: block;
}

.qr-code-actions p {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 1rem 0;
}

.download-qr-btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    text-decoration: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .qr-code-display-wrapper {
        flex-direction: column;
        text-align: center;
    }
}

/* --- START: ADD THIS NEW RULE --- */
.privacy-text a {
    color: #065f46; /* Match your green theme */
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted #065f46;
    transition: all 0.2s;
}
.privacy-text a:hover {
    color: #10b981;
    border-bottom-style: solid;
}
/* --- END: NEW RULE --- */

/* (4) General button styling is already handled by admin_style.css */
/* No new button styles are needed unless you want to override them */

.char-counter { font-size: 0.8rem; color: #777; text-align: right; margin-top: 0.25rem; }

.form-actions { margin-top: 2rem; text-align: center; }
.save-btn { /* ... (no change needed) ... */ }
.notice-box { /* ... (no change needed) ... */ }
.uploader-section { /* ... (no change needed) ... */ }

.save-btn {
    background-color: #28a745; /* The green color */
    color: white;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: #218838; /* The hover color */
}

/* --- Styles for Button with Spinner --- */
.save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Disabled state for the button */
.save-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* --- REVISED: Orange Theme for ALL Advanced Buttons/Links --- */

/* This targets ANY element with the .advanced-btn class */
.advanced-btn {
    background-color: #f97316 !important;
    color: white !important;
    font-size: 1.1rem !important;
    padding: 0.8rem 2rem !important;
    width: auto !important;
    display: inline-block; /* Important for <a> tags */
    text-align: center;
    border-radius: 5px; /* Ensure <a> tags also get rounded */
    text-decoration: none; /* Remove underline from <a> tags */
}
.advanced-btn:hover {
    background-color: #ea580c !important;
}

/* Styles for placing dimension inputs side-by-side */
.dimension-inputs {
    display: flex;
    gap: 1.5rem; /* Space between the two input boxes */
    align-items: flex-end;
}

/* Ensure each input takes up equal space */
.dimension-inputs .form-section {
    flex: 1;
}

/* --- Checkbox Section Styles --- */
.form-section.checkbox-section {
    display: flex; /* Use flexbox for horizontal alignment */
    align-items: flex-start; /* Align text to the top if it wraps */
    gap: 10px; /* Space between checkbox and label text */
    margin-bottom: 15px; /* Space between checkbox items */
}

.form-section.checkbox-section input[type="checkbox"] {
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    margin-top: 4px; /* Adjust vertical alignment with text */
    width: 18px; /* Slightly larger checkbox */
    height: 18px;
    cursor: pointer;
}

.form-section.checkbox-section label {
    font-size: 0.95rem; /* Slightly smaller font for checkbox labels */
    color: #444; /* Darker text for readability */
    line-height: 1.4;
    cursor: pointer; /* Indicate label is clickable */
}

.form-section.checkbox-section label a {
    color: #007bff; /* Link color */
    text-decoration: underline; /* Standard underline for links */
    transition: color 0.2s;
}

.form-section.checkbox-section label a:hover {
    color: #0056b3; /* Darker blue on hover */
}

/* Style for the instructional note */
.field-note {
    font-size: 0.85rem;
    color: #555;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Style for the disabled 'Total Pages' input to make it look like a display field */
#total_pages_display:disabled {
    background-color: #e9ecef;
    font-weight: bold;
    color: #495057;
    cursor: not-allowed;
    border-color: #ced4da;
}

.message-link {
    font-weight: bold;
    color: inherit; /* Inherits the green or red color from the parent */
    text-decoration: underline;
    margin-top: 0.5rem;
    display: inline-block;
}

/* --- Add these new, corrected spinner rules --- */

/* The container for the button and spinner */
.submit-container {
    position: relative; /* This is crucial for positioning the overlay */
    display: inline-block; /* Makes the container only as wide as its content (the button) */
}

/* The spinner overlay itself */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(167, 243, 208, 0.8); /* A semi-transparent green to match the button */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    transition: opacity 0.2s; /* Smooth fade-in effect */
    z-index: 9999; /* Ensure it appears on top of other content */
}

/* The class that hides the spinner */
.spinner-overlay.hidden {
    display: none;
}

/* The actual spinning icon */
.spinner-icon {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff; /* White spinner on green background */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.profile-pic-preview {
    max-width: 150px; /* Adjust as needed */
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px; /* Slightly rounded corners */
    margin-top: 10px;
    margin-bottom: 20px; /* Space below the image */
    display: block; /* Ensures it takes its own line */
    object-fit: cover; /* Ensures image fills the space without distortion */
}


/* --- Reusable Styles for Shareable URL Input + Copy Button --- */

.share-link-wrapper {
    display: flex;
    gap: 10px; /* Space between input and button */
    align-items: center; /* Vertically align items */
}

/* This targets any text input inside the wrapper */
.share-link-wrapper .text-input {
    flex-grow: 1; /* Allow the input to take up all available space */
    width: auto; /* Override any fixed width */
    min-width: 0; /* Allow shrinking */
    background-color: #f8f9fa; /* Light gray to indicate it's readonly */
}

/* This is the master style for ALL copy buttons */
.copy-url-btn {
    flex-shrink: 0; /* Prevent the button from shrinking */
    width: 48px;    /* A consistent height and width */
    height: 42px;
    padding: 8px;
    border: 1px solid #ccc;
    background-color: #e9ecef;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
    color: #495057; /* A neutral icon color */
}

.copy-url-btn:hover {
    background-color: #ced4da;
    transform: translateY(-1px); /* Slight lift on hover */
}

.copy-url-btn.success {
    background-color: #16a34a !important; /* A nice success green */
    color: white !important;
    border-color: #15803d !important;
}

/* This targets the SVG inside ANY copy button */
.copy-url-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor; /* Inherit the button's text color */
}

/* Verification Success Page */


.go-to-dashboard-btn {
    display: inline-block;
    background-color: #28a745; /* A nice blue, or match your save-btn */
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 25px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.go-to-dashboard-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Google reCAPTCHA */

.recaptcha-section {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex; /* Use flexbox to easily center the recaptcha widget */
    justify-content: center;
}

/* --- Styling for Branding Section in Advanced Edit --- */
.branding-sub-section { 
    border-left: 3px solid #e9e9f3; 
    padding-left: 20px; 
    margin-bottom: 25px; 
}
.branding-label { 
    font-size: 1.1em; 
    font-weight: bold; 
    color: #333; 
    display: block;
    margin-bottom: 5px;
}
.branding-note { 
    font-size: 0.85rem; 
    color: #555; 
    margin-top: 0; 
    margin-bottom: 15px; 
}
.branding-preview { 
    max-width: 160px; 
    height: auto; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    margin-bottom: 10px; 
    display: block; 
}
.current-asset { 
    margin-bottom: 15px; 
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 5px;
}
.remove-check { 
    font-size: 0.9em; 
    color: #c9302c; 
    display: block; 
    margin-top: 10px;
    font-weight: bold;
}
.remove-check input {
    margin-right: 5px;
    vertical-align: middle;
}
.branding-divider { 
    border: 0; 
    height: 1px; 
    background-color: #eee; 
    margin: 2.5rem 0; 
}

/* --- NEW: Orange Theme for Advanced Uploader Spinner --- */

/* This targets the spinner overlay only on the advanced editor page */
#advanced-editor-page #adv-uploader-spinner {
    background-color: rgba(255, 247, 237, 0.8); /* Semi-transparent pale orange */
    color: #9a3412; /* Deep orange text */
}

#advanced-editor-page #adv-uploader-spinner .spinner-icon {
    border-color: rgba(124, 45, 18, 0.3); /* Muted orange for the track */
    border-top-color: #9a3412; /* Deep orange for the spinning part */
}

/* --- Styles for Media Management List --- */
.media-list-container {
    margin-top: 1.5rem;
}

.media-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.media-table th, .media-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.media-table th {
    background-color: #f7f7f7;
    font-weight: 600;
}

.media-table tr:nth-child(even) {
    background-color: #fdfdfd;
}

.media-table td small {
    color: #777;
    display: block;
    word-break: break-all;
}

.media-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: #fff;
    text-transform: capitalize;
}
.media-type-badge.type-video { background-color: #007bff; }
.media-type-badge.type-audio { background-color: #fd7e14; }
.media-type-badge.type-image { background-color: #28a745; }
.media-type-badge.type-360tour { background-color: #a855f7; }

/* Style for the "View" button on manage tables */
.actions-cell .view-btn {
    background-color: #0d6efd; /* A standard blue */
    color: white;
}
.actions-cell .view-btn:hover {
    background-color: #0b5ed7;
}

/* --- NEW: Styles for Display Mode Badges --- */

.display-mode-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    border: 1px solid;
}

.display-mode-badge.mode-lightbox {
    background-color: #e7e5e4; /* stone-200 */
    border-color: #d6d3d1;   /* stone-300 */
    color: #57534e;          /* stone-600 */
}

.display-mode-badge.mode-in-page {
    background-color: #dbeafe; /* blue-100 */
    border-color: #bfdbfe;   /* blue-200 */
    color: #374151;          /* gray-700 */
}

.actions-cell {
    white-space: nowrap;
}

.action-btn {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 5px;
}

.action-btn.edit-btn { background-color: #6c757d; }
.action-btn.edit-btn:hover { background-color: #5a6268; }

.action-btn.delete-btn { background-color: #dc3545; }
.action-btn.delete-btn:hover { background-color: #c82333; }



/* --- Styles for Page Manager --- */
.page-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.page-manager-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.page-manager-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5; /* Or your typical page aspect ratio */
    object-fit: cover;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #f0f0f0;
}

.page-manager-info {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.page-manager-info .page-label {
    font-weight: 600;
    font-size: 0.9em;
}

/* --- Styles for Page Manager Re-ordering --- */

.page-manager-actions {
    margin-bottom: 1rem;
}

.page-manager-item {
    position: relative; /* Needed for the drag handle positioning */
}

.drag-handle {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: grab;
    font-weight: bold;
    z-index: 10;
}

/* This is the class for the placeholder element when dragging */
.sortable-ghost {
    opacity: 0.4;
    background: #cce5ff;
}

/* --- NEW: Step-by-Step Form Container Styles (Green Theme) --- */

.step-container {
    background-color: #ffffff;
    border: 1px solid #d1fae5; /* A very soft green border */
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Ensures the border-radius clips the header */
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f0fdf4; /* A very light, minty green */
    padding: 15px 20px;
    border-bottom: 1px solid #d1fae5; /* Matches the main border */
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #10b981; /* A rich, modern green */
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0; /* Prevents the circle from squishing */
}

.step-title {
    margin: 0;
    font-size: 1.4rem;
    color: #065f46; /* A deep, forest green for strong readability */
}

.step-content {
    padding: 25px;
}

/* Remove the top margin from the first fieldset inside a step for cleaner alignment */
.step-content fieldset {
    margin-top: 0;
    padding: 0;
    border: none;
}

/* --- START: ADD THIS NEW STANDARDIZED RULE --- */

.step-description {
    font-size: 0.95rem; /* A comfortable, readable size */
    color: #555; /* A soft, dark gray */
    line-height: 1.5; /* Good spacing between lines */
    margin-bottom: 1.5rem; /* Consistent spacing below the description */
    padding-bottom: 1.5rem; /* Space before the first form element */
    border-bottom: 1px solid #f0f0f0; /* A subtle separator line */
}

/* --- END: NEW STANDARDIZED RULE --- */

/* --- Styles for Dimension Preview --- */
.dimensions-layout {
    display: flex;
    gap: 2rem; /* Space between inputs and preview */
    align-items: flex-start; /* Align to the top */
}

.dimensions-inputs {
    flex: 1; /* Allow the inputs to take up available space */
}

/* NEW: Wrapper for the preview and its label */
.dimension-preview-wrapper {
    flex-shrink: 0;
    width: 150px;
}

/* NEW: Style for the "Preview Layout:" label */
.preview-label {
    font-size: 1rem;
    font-weight: 600;
    color: #064e3b;
    margin-bottom: 0.5rem;
    /* This aligns it with the other form labels */
    padding-left: 12px;
}

.dimension-preview-container {
    width: 100%; /* Take up full width of the wrapper */
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: 2px dashed #d1fae5;
    border-radius: 5px;
    background-color: #fafffd;
}

#dimension-preview-box {
    background-color: #a7f3d0;
    border: 1px solid #6ee7b7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* NEW: Use flexbox to center the text inside */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* NEW: Style for the dimension text */
#dimension-preview-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #064e3b; /* A darker, readable green */
    padding: 5px;
    line-height: 1.2;
}

#dimension-preview-box {
    background-color: #a7f3d0; /* A pleasant green */
    border: 1px solid #6ee7b7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Orange Theme for Success Messages in Advanced Editor --- */

/* By using the page-specific ID, this rule will always win */
#advanced-editor-page .message.success {
    background-color: #feead0 !important; /* Very light orange */
    border-color: #fed7aa !important;     /* A soft, warm orange border */
    color: #9a3412 !important;            /* A deep, rich orange for the text */
}

#advanced-editor-page .message.success strong {
    color: #f97316 !important;
}

/* --- NEW: Orange Theme for Buttons in Hotspot Editors --- */

/* This rule targets the save button on BOTH editor pages */
#hotspot-editor-page .save-btn,
#media-editor-page .save-btn {
    background-color: #f97316; /* Vibrant orange */
}

#hotspot-editor-page .save-btn:hover,
#media-editor-page .save-btn:hover {
    background-color: #ea580c; /* Darker orange for hover */
}

/* --- NEW: Grid layout for style controls --- */
.style-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 1.5rem;
}

/* =================================================================== */
/* --- STYLES FOR THE CREATIVE TEXT BLOCK EDITOR --- */
/* =================================================================== */

#text-block-editor-page .form-pane fieldset {
    border: none; /* Remove the orange border we added previously */
    box-shadow: none;
    background: none;
}

/* --- START: ADD THIS NEW RULE FOR SPACING --- */
/* This targets both editor pages for consistency */
#text-block-editor-page .form-pane .form-section,
#media-editor-page .form-pane .form-section {
    margin-bottom: 1.2rem; /* Increase this value for more space */
}
/* --- END: NEW RULE --- */

#text-block-editor-page .form-pane legend {
    /* Use the subtitle style for a cleaner look */
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    width: auto;
    background: none;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Style the range sliders for a more modern feel */
#text-block-editor-page input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 5px;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}
#text-block-editor-page input[type="range"]:hover {
    opacity: 1;
}
#text-block-editor-page input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #f97316; /* Orange handle */
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
#text-block-editor-page input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #f97316;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Style the color pickers for a consistent look */
#text-block-editor-page input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* THE FIX: Make the input container a circle */
    width: 42px; /* Set a fixed width */
    height: 42px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 50%; /* This makes it a circle */
    cursor: pointer;
    background-color: transparent;
}

/* This targets the actual color preview inside the input for Chrome/Safari */
#text-block-editor-page input[type="color"]::-webkit-color-swatch {
    /* THE FIX: Make the swatch itself a circle and add a border */
    border-radius: 50%;
    border: 2px solid white; /* A white border helps it stand out */
}

/* This targets the color preview for Firefox */
#text-block-editor-page input[type="color"]::-moz-color-swatch {
    /* THE FIX: Make the swatch a circle */
    border-radius: 50%;
    border: none; /* Firefox handles borders differently, so none is better here */
}

/* Group the color picker and opacity slider side-by-side */
#text-block-editor-page .color-opacity-group {
    display: grid;
    grid-template-columns: 80px 1fr; /* Color swatch takes up less space */
    align-items: center;
    gap: 1rem;
}

/* Make the "Save Text Block" button orange */
#text-block-editor-page .save-btn {
    background-color: #f97316;
}
#text-block-editor-page .save-btn:hover {
    background-color: #ea580c;
}


/* --- Responsive adjustment for smaller screens --- */
@media (max-width: 768px) {
    .dimension-preview-container {
        width: 100%; /* Make preview container full width */
        margin-top: 1rem; /* Adjust top margin */
    }
}

/* --- ============================================= --- */
/* --- DEFINITIVE RESPONSIVE STYLES (WITH !important) -- */
/* --- ============================================= --- */

@media (max-width: 768px) {

    /* --- 1. Force a larger base font size on the body --- */
    body {
        font-size: 16px !important; 
        -webkit-text-size-adjust: 100%; /* Prevent iOS font-size adjustments */
    }

    /* --- 2. General Layout & Spacing --- */
    .form-container {
        padding: 1rem !important;
    }

    .form-header h1 {
        font-size: 1.6rem !important;
    }

    /* --- 3. Step Containers --- */
    .step-title {
        font-size: 1.3rem !important;
    }
    .step-description {
        font-size: 1rem !important;
    }

    /* --- 4. Form Elements (THE MOST IMPORTANT PART) --- */
    
    /* Style for main labels and subtitles */
    .form-section label:not(.checkbox-section label), /* Exclude checkbox labels */
    .shareable-url-label,
    .preview-label,
    .section-subtitle {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    /* Specific style for checkbox labels on mobile */
    .checkbox-section label {
        font-size: 1rem !important; /* Make it match the body text size */
        font-weight: 400 !important; /* Make it normal weight, not bold */
    }

    /* Set input font size to 16px to prevent iOS auto-zoom */
    .text-input, 
    select.text-input,
    textarea.text-input {
        font-size: 1rem !important; /* 16px */
        padding: 0.9rem !important;
    }

    .char-limit-note {
        font-size: 0.9rem !important;
    }

    /* --- 5. Privacy Options --- */
    .privacy-text strong {
        font-size: 1.1rem !important;
    }
    .privacy-text span,
    .privacy-text a {
        font-size: 1rem !important;
    }

    /* --- 6. Final Action Buttons --- */
    .form-actions {
        text-align: center !important;
    }
    .save-btn {
        width: auto !important; /* THE FIX: Let the button size to its content */
        min-width: 45%; /* Ensure it's still a nice, large tap target */
        padding: 1rem 2rem !important; /* Add generous left/right padding */
        font-size: 1rem !important;
        font-weight: 600 !important;
    }
    
    /* This rule should still work without !important but we add it for safety */
    .dimensions-layout {
        flex-direction: column !important; 
        align-items: stretch !important;
    }
}

/* --- NEW: Styles for Informational Notice Box (Green Theme) --- */

.notice-box.info-notice {
    display: flex; /* Align icon and text side-by-side */
    align-items: flex-start; /* Align to the top */
    gap: 15px;
    background-color: #f0fdf4; /* A very light, minty green (Matches step headers) */
    border: 1px solid #d1fae5; /* A very soft green border (Matches step containers) */
    border-left: 5px solid #10b981; /* A strong accent green (Matches step number) */
    color: #059669; /* A readable, medium green for text */
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    text-align: left;
}

.notice-icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.info-notice strong {
    display: block;
    font-size: 1.1rem;
    color: #065f46; /* A deep, forest green for the title (Matches step titles) */
    margin-bottom: 0.25rem;
}

.notice-link {
    display: block;
    margin-top: 0.5rem;
    font-weight: bold;
    color: #047857; /* A strong, clickable green */
    text-decoration: none;
    transition: color 0.2s;
}

.notice-link:hover {
    color: #065f46; /* Darkens on hover */
    text-decoration: underline;
}

/* --- NEW: Styles for Success Info Box (Payment) --- */

.success-info-box {
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    padding: 15px;
    border-radius: 8px;
    margin: 1.5rem auto;
    max-width: 400px;
    line-height: 1.6;
}

/* --- NEW: Styles for Section Separator --- */

.section-separator {
    margin: 2.5rem 0; /* Add generous vertical spacing */
    text-align: center; /* Center the line if it has a max-width */
}

.section-separator .separator-line {
    border: none; /* Remove the default 3D border */
    height: 1px; /* Make it a thin, modern line */
    background-color: #e0e7ff; /* A soft, neutral color */
    
    /* Optional: To make it not span the full width */
    /* max-width: 80%; */
    /* margin: 0 auto; */
}

/* --- NEW: Styles for Advanced Features Box (Orange Theme) --- */

.advanced-features-box {
    border-color: #ffedd5; /* Soft orange border */
}

.advanced-features-box .step-header {
    background-color: #fff7ed; /* Very light orange */
    border-bottom-color: #ffedd5;
}

.advanced-features-box .step-number {
    background-color: #f97316; /* A vibrant, modern orange */
}

.advanced-features-box .step-title {
    color: #9a3412; /* A deep, rich orange for text */
}

/* Style for the orange "Open Advanced Editor" button */
/* =================================================================== */
/* --- THEME OVERRIDES FOR ADVANCED EDITOR PAGE --- */
/* =================================================================== */

/* --- Orange Theme for ALL Save/Action Buttons --- */
/* This rule targets any .save-btn inside the advanced editor page */
#advanced-editor-page .save-btn {
    background-color: #f97316; /* Vibrant orange */
    color: white;
}
#advanced-editor-page .save-btn:hover {
    background-color: #ea580c; /* Darker orange for hover */
}


/* --- Special Case: "Save New Order" Button (Yellow-Orange) --- */
/* This more specific rule will override the orange for just this one button */
#advanced-editor-page #reorder-form .save-btn {
    background-color: #ffc107;
    color: #212529; /* Dark text */
}
#advanced-editor-page #reorder-form .save-btn:hover {
    background-color: #e0a800;
}

.advanced-features-box .step-number .step-icon {
    width: 90%; /* Make the icon 90% of the circle's width */
    height: 90%; /* Make the icon 90% of the circle's height */
    object-fit: contain; /* Ensures the icon scales without distortion */
}
/* --- END: NEW RULE --- */

/* Style for the features list for unsubscribed users */
.features-list {
    /* ... */
}

/* Style for the features list for unsubscribed users */
.features-list {
    font-size: 0.95rem;
    color: #78350f; /* A muted orange-brown for readability */
    text-align: left;
    background-color: #fffaf0;
    border: 1px solid #fed7aa;
    border-radius: 5px;
    padding: 1rem 1.5rem;
}

.features-list strong {
    font-weight: 600;
    color: #9a3412;
}

.features-list ul {
    list-style: none; /* Remove default bullet points */
    padding-left: 0;
    margin-top: 0.5rem;
}

.features-list li {
    margin-bottom: 0.5rem;
}

/* --- NEW: Styles for Form Separator and Subtitles --- */

hr.form-separator {
    border: none;
    height: 1px;
    background-color: #eef2f6; /* A very light, neutral gray */
    margin: 1.5rem 0; /* Add generous vertical spacing */
}

label.section-subtitle {
    font-size: 1.1rem; /* Slightly larger than a normal label */
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem; /* Space between title and checkbox */
    /* It inherits other label styles, so this is all we need */
}

/* --- NEW: Green Theme Override for Dashboard & Profile Pages --- */

/* This rule is more specific and will override the orange style on the correct pages */
.dashboard-theme .tab-link.active {
    color: #198754; /* A strong theme green */
    border-bottom-color: #198754;
}

/* Responsive override for the left border on mobile */
@media (max-width: 768px) {
    .dashboard-theme .tab-link.active {
        border-left-color: #198754;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}



/* --- V2: Unified Style for Locked Editor Tabs --- */
/* This rule now targets the same class as the header link */
.tab-link.locked-feature-link {
    color: #9ca3af; /* Muted color */
    cursor: help;   /* The '?' cursor */
    position: relative;
    opacity: 0.7;
}

.tab-link.locked-feature-link:hover {
    background-color: #f9fafb;
    color: #1f2937;
    opacity: 1;
}

.tab-link.locked-feature-link .lock-icon {
    margin-left: 8px;
    font-size: 0.8em;
}

/* =================================================================== */
/* --- STYLES FOR VISUAL HOTSPOT EDITOR LAYOUT --- */
/* =================================================================== */

/* --- 1. Base Layout (Applies to ALL editors) --- */
.visual-editor-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start; /* Align items to the top */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.editor-pane {
    flex: 3; /* The visual part takes up more space */
    min-width: 300px;
}

.form-pane {
    flex: 2; /* The form part takes up less space */
    min-width: 280px;
}


/* --- 2. Sticky Enhancements (Applied on top of the base layout) --- */
.visual-editor-layout.sticky-layout .editor-pane,
.visual-editor-layout.sticky-layout .form-pane {
    position: sticky;
    top: 100px; /* Adjust this value based on your header height */
}

/* Specific styles for the scrolling form pane */
.visual-editor-layout.sticky-layout .form-pane {
    max-height: calc(100vh - 120px); /* 100px for top offset + 20px bottom padding */
    overflow-y: auto;
    padding-right: 10px; /* Space for the scrollbar */
}


/* --- 3. Responsive Adjustments --- */
@media (max-width: 900px) {
    /* On smaller screens, stack the columns */
    .visual-editor-layout {
        flex-direction: column;
    }

    /* Disable stickiness on smaller screens where it doesn't make sense */
    .visual-editor-layout.sticky-layout .editor-pane,
    .visual-editor-layout.sticky-layout .form-pane {
        position: static;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* --- (Your existing styles for #page-image-container are good) --- */
#page-image-container {
    position: relative;
    width: 100%;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}
#page-image {
    display: block;
    width: 100%;
    height: auto;
}

/* =================================================================== */
/* --- ENHANCED: Styles for Visual Hotspot Editor Icons (Final Version 2.0) --- */
/* =================================================================== */

/* Base style for ALL draggable boxes */
#draggable-hotspot {
    position: absolute !important;
    box-sizing: border-box;
    cursor: move;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.2s ease;
}

#draggable-hotspot svg {
    width: 100%;
    height: 100%;
    fill: white !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* --- Style for ALL circular hotspots (Video Lightbox, Audio, Image) --- */
#draggable-hotspot.type-video,
#draggable-hotspot.type-audio,
#draggable-hotspot.type-image:not(.has-thumbnail) {
    border-radius: 50%; /* Make it a circle */
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Specific background colors */
#draggable-hotspot.type-video { background-color: rgba(0, 0, 0, 0.6); } /* Blue for video trigger */
#draggable-hotspot.type-audio { background-color: rgba(255, 152, 0, 0.7); }
#draggable-hotspot.type-image { background-color: rgba(76, 175, 80, 0.7); }


/* --- Style for the IN-PAGE IMAGE & VIDEO THUMBNAIL PREVIEW --- */
/* By being more specific, this rule will always override the default circular style */

#draggable-hotspot.type-video.has-thumbnail,
#draggable-hotspot.type-image.has-thumbnail {
    border-radius: 5px !important; /* Become a rectangle, !important for safety */
    box-shadow: none !important; /* Remove the icon shadow */
    padding: 0 !important; /* Remove icon padding */
    
    /* Background styles for the preview image/frame */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000; /* Black background for letterboxing */
    border: 2px solid rgba(255,255,255,0.7);
}

/* The play icon overlay for the video thumbnail */
.editor-play-icon {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
#draggable-hotspot:hover .editor-play-icon {
    background-color: rgba(0,0,0,0.5);
}
.editor-play-icon svg {
    width: 30%;
    height: 30%;
    max-width: 64px;
}

/* 2. Audio and Image Hotspots (Now with white border) */
#draggable-hotspot.type-audio,
#draggable-hotspot.type-image {
    border-radius: 50%; /* Make it a circle */
    
    /* THE FIX: Add the white border */
    border: 2px solid white;

    /* Add the drop shadow to match the viewer icons */
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Specific background colors for Audio */
#draggable-hotspot.type-audio {
    background-color: rgba(255, 152, 0, 0.7); /* Orange, matches viewer */
}

/* Specific background colors for Image */
#draggable-hotspot.type-image {
    background-color: rgba(76, 175, 80, 0.7); /* Green, matches viewer */
}

/* --- NEW: Style for the 360 Tour Placeholder Preview --- */

/* Make the draggable box a clean rectangle */
#draggable-hotspot.type-360tour {
    border: 2px solid #a855f7; /* Purple border */
    background-color: rgba(245, 243, 255, 0.9); /* A very light, semi-transparent purple */
    border-radius: 5px;
    padding: 10px;
    align-items: center; /* Center the text inside */
    justify-content: center;
    text-align: center;
}

/* Style the placeholder text */
.editor-placeholder-preview {
    font-size: 1.1rem;
    font-weight: 600;
    color: #5b21b6; /* A deep purple */
    line-height: 1.3;
}

.editor-placeholder-preview span {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6d28d9;
    display: block;
}

/* ... all your existing hotspot styles for media icons ... */

/* --- DEFINITIVE FIX for Link Hotspot Editor --- */

/* This rule styles the main draggable box */
#link-hotspot-editor-page #draggable-hotspot {
    border: 2px solid #007bff !important;
    background-color: rgba(0, 123, 255, 0.4) !important;
    border-radius: 5px !important;
}

/* This rule targets and hides the pseudo-elements using the older, more compatible single-colon syntax */
#hotspot-editor-page #draggable-hotspot:before,
#hotspot-editor-page #draggable-hotspot:after {
    display: none !important;
}

/* --- NEW: Style for Draggable Text Block in Editor --- */

#text-block-editor-page #draggable-hotspot {
    /* Make the container itself transparent */
    background-color: transparent !important;
    
    /* Add a subtle dashed border to show the boundaries when the background is also transparent */
    border: 1.2px dashed rgba(0, 0, 0, 0.3) !important;
    border-radius: 0px !important; /* Text boxes often start as rectangles */
    
    /* Allow the inner preview div to handle the user's custom styles */
    padding: 0 !important; /* Remove padding from the outer container */
}

/* Style for the inner preview div that shows the user's styles */
#text-block-editor-page .text-preview-content {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Hide text that overflows the box */
    word-wrap: break-word;
    
    /* These flex properties are for vertically aligning the text */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- NEW: Styles for Status Badges --- */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.9rem;
}
.status-badge.success-status {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}
.status-badge.warning-status {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

/* --- NEW: Styles for "Add More Pages" Options --- */

/* --- REVISED: Styles for "Add More Pages" Options --- */

/* By adding the parent selectors, this rule becomes more specific */
.tab-panel fieldset .upload-option-box {
    border: 1px solid #ffedd5;
    border-radius: 8px;
    
    /* THE FIX: Use !important to force this padding to apply */
    padding: 1.5rem 2.4rem !important; 
    
    /* Margin is fine as is */
    margin-bottom: 1.5rem;
    background-color: #fffaf0;

    /* Also remove any margin that might be inherited from the wildcard rule */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.upload-option-box .branding-label {
    margin-bottom: 0.5rem;
    color: #4338ca; /* An indigo color for titles */
}

/* Container for the tool links */
.tool-recommendation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-link {
    display: block;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.tool-link:hover {
    border-color: #4338ca;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tool-link strong {
    display: block;
    font-weight: 600;
    color: #3730a3;
    margin-bottom: 0.25rem;
}

.tool-link span {
    font-size: 0.9rem;
    color: #555;
}

/* --- NEW: Styles for Flipbook Limit Reached Box --- */

.limit-reached-box {
    text-align: center;
    background-color: #fff7ed; /* Light orange warning */
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.limit-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.limit-reached-box h2 {
    font-size: 1.8rem;
    color: #9a3412;
    margin: 0 0 0.5rem 0;
}

.limit-reached-box p {
    font-size: 1.1rem;
    color: #78350f;
    line-height: 1.6;
    margin: 0 auto 1.5rem auto;
    max-width: 500px;
}

.limit-reached-box .save-btn {
    width: auto; /* Let the button size to its content */
}

/* --- NEW: Style for the Upgrade Action Box --- */

.upgrade-action-box {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ffedd5; /* A soft orange separator line */
}

/* --- NEW: Black/Gray Business Theme for Privacy Boxes --- */

.business-theme-box {
    border-color: #d1d5db !important; /* light gray */
}

.business-theme-box legend {
    background-color: #d7dcdf !important; /* lighter gray */
    color: #1f2937 !important; /* deep dark gray */
}

/* Style for the buttons inside this themed box */
.business-theme-box .save-btn {
    background-color: #4b5563 !important; /* dark gray */
    color: white !important;
}
.business-theme-box .save-btn:hover {
    background-color: #374151 !important; /* darker gray for hover */
}

/* --- NEW: Styles for Subscription Status Badges --- */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: capitalize;
}

.status-badge.free-status {
    background-color: #d1fae5; /* Pale Green */
    color: #065f46;
}

.status-badge.pro-status {
    background-color: #fff7ed; /* Pale Orange */
    color: #9a3412;
}

.status-badge.business-status {
    background-color: #e5e7eb; /* Pale Gray */
    color: #1f2937;
}

/* --- NEW: Styles for In-Page Drag-and-Drop Uploader --- */

/* We use the body ID to make these styles specific to the advanced editor */
#advanced-editor-page .drop-zone {
    border: 2px dashed #fed7aa; /* Soft orange */
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

#advanced-editor-page .drop-zone.dragover {
    border-color: #f97316; /* Vibrant orange */
    background-color: #fff7ed; /* Pale orange */
}

#advanced-editor-page .drop-zone .upload-icon {
    max-width: 50px;
    margin-bottom: 1rem;
    opacity: 0.6;
}

#advanced-editor-page .drop-zone .small-text {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

#advanced-editor-page .drop-zone .browse-files-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fb923c; /* A lighter, friendly orange */
    color: white;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

#advanced-editor-page .drop-zone .browse-files-label:hover {
    background-color: #f97316; /* Main theme orange on hover */
}

.range-value-display { font-weight: bold; margin-left: 10px; }

.range-value-display { font-weight: bold; margin-left: 10px; }

.category-selection-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.category-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.category-checkbox-label:hover {
    background-color: #e9ecef;
}
.category-checkbox-label input:checked + span {
    font-weight: 600;
    color: #0d6efd;
}

/* --- DEFINITIVE STYLES for Hotspot Previews in Editor --- */

.hotspot-preview {
    position: absolute;
    opacity: 0.6;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 5;
}

/* Make the ACTIVE hotspot always appear on top */
#draggable-hotspot {
    z-index: 10;
}

/* --- Preview Styles Copied & Adapted from main style.css --- */

/* For LINK hotspots */
.hotspot-preview.hotspot {
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(2, 136, 209, 0.7);
    animation: hotspot-pulse 2.5s infinite;
}

/* For TRIGGER ICON hotspots */
.hotspot-preview.video-trigger,
.hotspot-preview.audio-trigger,
.hotspot-preview.image-trigger {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.hotspot-preview.video-trigger { background-color: rgba(0, 123, 255, 0.7); }
.hotspot-preview.audio-trigger { background-color: rgba(255, 152, 0, 0.7); }
.hotspot-preview.image-trigger { background-color: rgba(76, 175, 80, 0.7); }
.hotspot-preview .play-icon, .hotspot-preview svg { width: 100%; height: 100%; }

/* --- For IN-PAGE elements PREVIEWS --- */

/* Style the wrapper */
.hotspot-preview.in-page-image-wrapper {
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border-radius: 4px;
    overflow: hidden; /* Important to contain the image */
}

/* Style the image INSIDE the wrapper */
.hotspot-preview.in-page-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* THE KEY: This guarantees the full image is visible */
    display: block;
}

/* Fallback for video/360 tour previews that don't use an img tag */
.hotspot-preview.in-page-video-wrapper,
.hotspot-preview.in-page-360-wrapper {
    background-color: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border-radius: 4px;
    overflow: hidden;
}

.hotspot-preview.in-page-360-wrapper,
.hotspot-preview.in-page-video-wrapper {
    background-color: #000;
}

/* For TEXT blocks */
.hotspot-preview.text-block-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    word-wrap: break-word;
}

/* --- NEW: Styles for Modal Pop-up --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay:not(.hidden) {
    opacity: 1;
}
.modal-overlay.hidden {
    display: none;
}
.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.modal-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
}
.modal-content p {
    color: #555;
}


/* --- STYLES FOR AUDIO RECORDER MODAL --- */
.label-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.record-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 10px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    cursor: pointer;
}
.record-audio-btn:hover { background-color: #e5e7eb; }
.record-audio-btn svg { width: 14px; height: 14px; }

.recorder-status { text-align: center; color: #6b7280; margin: 1rem 0; }
.recorder-controls { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 2rem 0; }
.mic-btn {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: none;
    background-color: #ef4444; /* Red for recording */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.mic-btn.is-recording {
    background-color: #3b82f6; /* Blue for stop */
    animation: pulse 1.5s infinite;
}
.mic-btn svg { width: 36px; height: 36px; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.timer { font-size: 1.2rem; font-weight: 500; color: #374151; font-family: monospace; }
#audio-playback-container { margin: 1.5rem 0; }
#audio-playback { width: 100%; }


/* --- REVISED: Styles for Social Login Buttons --- */

.social-login-container {
    display: flex;
    flex-direction: column; /* KEY CHANGE: Stack buttons vertically */
    align-items: center;     /* KEY CHANGE: Center buttons horizontally */
    gap: 1rem;               /* KEY CHANGE: Add 16px of space between buttons */
    margin-bottom: 1.5rem;
}

.social-login-btn {
    display: flex;          /* Use flex for better internal alignment */
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    
    width: 300px;           /* KEY CHANGE: Give buttons a fixed width for alignment */
    max-width: 100%;        /* Ensure it's responsive on small screens */
    box-sizing: border-box;

    border-radius: 8px;     /* Slightly more rounded corners */
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid #ddd;
    
    /* Subtle shadow for a "lifting" effect */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}

.social-login-btn:hover {
    transform: translateY(-2px); /* Lift the button slightly on hover */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Enhance shadow on hover */
}

.social-login-btn img {
    height: 24px; /* Slightly larger icon */
    width: 24px;
}

/* --- Google Button Styles --- */
.google-btn {
    background-color: #ffffff;
    color: #444;
}
.google-btn:hover {
    border-color: #ccc;
    background-color: #f9f9f9;
}

/* --- Separator --- */

.form-separator-text {
    text-align: center;
    margin: 1.5rem 0;
    color: #aaa;
    font-weight: 500;
    position: relative;
}
.form-separator-text span {
    background-color: white;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}
.form-separator-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd;
    z-index: 0;
}
/* --- LINE Button Styles --- */
.line-btn {
    background-color: #00c300;
    color: white;
    border-color: #00b900;
}
.line-btn:hover {
    background-color: #00b300;
    border-color: #00a000;
}

/* --- Styles for Adobe Login Button (with higher specificity) --- */
.social-login-btn.adobe-btn {
    background-color: #fa0f00; /* Official Adobe Red */
    color: white;
    border-color: #c80c00;
}

.social-login-btn.adobe-btn:hover {
    background-color: #d60a00;
    border-color: #a40800;
}

/* --- NEW: Styles for Danger-zone Account Deletion Buttons --- */

.danger-zone {
    margin-top: 2.5rem !important;
    padding: 1.5rem !important;
    border: 2px solid #ef4444 !important;
    border-radius: 8px !important;
    background-color: #fee2e2 !important;
}
.danger-zone legend {
    color: #b91c1c;
}
.danger-zone p {
    color: #991b1b;
}
.delete-account-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.delete-account-btn:hover {
    background-color: #c82333;
}
.danger-zone-link {
    color: #991b1b; /* A darker red */
    font-weight: 600;
    text-decoration: underline;
}
.danger-zone-link:hover {
    color: #7f1d1d; /* Even darker on hover */
}

/* =================================================================== */
/* --- STYLES FOR NEW "CREATE FROM IMAGES" PAGE --- */
/* =================================================================== */

/* 1. Drag and Drop Zone Styles (reusing existing classes) */
.drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}
.drop-zone.dragover {
    border-color: #28a745; /* Green to indicate a valid drop target */
    background-color: #f0fdf4;
}
.drop-zone .upload-icon {
    max-width: 50px;
    margin-bottom: 1rem;
    opacity: 0.6;
}
.drop-zone .small-text {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.drop-zone .browse-files-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff; /* Blue for the browse button */
    color: white;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.drop-zone .browse-files-label:hover {
    background-color: #0056b3;
}

/* 2. Re-orderable Image Preview Styles (reusing existing classes) */
/* This will automatically style the image grid and thumbnails */
#image-preview-container .page-manager-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: grab;
}
#image-preview-container .page-manager-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f0f0f0;
}

/* In /login/css/edit_form_style.css */
/* --- STYLES FOR TOC EDITOR --- */
#toc-items-container .toc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    
    /* --- THE FIX IS HERE (Part 1) --- */
    /* Add a left padding to make space for the handle */
    padding-left: 45px;
    /* This makes the item a positioning container for the handle */
    position: relative; 
}

#toc-items-container .drag-handle {
    /* --- THE FIX IS HERE (Part 2) --- */
    position: absolute; /* Take the handle out of the flexbox flow */
    left: 8px; /* Position it in the space we created */
    top: 50%;
    transform: translateY(-50%); /* Center it vertically */
    
    cursor: grab;
    font-weight: bold;
    color: #aaa;
    font-size: 1.5rem; /* Make the '::' a bit bigger and easier to see */
}

/* When the user is actively dragging */
#toc-items-container .drag-handle:active {
    cursor: grabbing;
}
.toc-title-input { flex-grow: 1; }
.toc-page-input { width: 70px; }
.indent-btn, .outdent-btn { background-color: #6c757d; }

/* --- Styles for Limit Reached Message --- */
.limit-reached-message {
    text-align: center;
    padding: 40px 20px;
}

.limit-reached-message .limit-icon {
    display: block; /* <-- ADD THIS LINE */
    margin-left: auto; /* <-- ADD THIS LINE */
    margin-right: auto; /* <-- ADD THIS LINE */
    width: 150px;
    height: auto;
    margin-bottom: 1.5rem;
}

.limit-reached-message h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.limit-reached-message p {
    color: #4b5563;
    line-height: 1.6;
    max-width: 450px;
    margin: 0 auto 1.5rem auto;
}

/* Re-use the .btn classes from your homepage for consistency */
.limit-reached-message .btn.btn-primary {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}
.limit-reached-message .btn.btn-primary:hover {
    background-color: #1d4ed8;
}

/* --- AI Generation Button Styles --- */
.ai-button-wrapper {
    float: right;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4.5px;
    margin-bottom: 5px;
}
.ai-btn {
    background-color: #8b5cf6; /* A nice purple */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.ai-btn:hover:not(:disabled) {
    background-color: #7c3aed;
}
.ai-btn:disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}
.ai-spinner {
    width: 16px;
    height: 16px;
}
.hidden {
    display: none !important;
}
/* --- NEW: Style for the AI Disclaimer --- */
.ai-disclaimer {
    font-size: 0.8rem; /* Small and unobtrusive */
    color: #6b7280;    /* Muted gray text */
    margin-top: 8px;   /* Add some space above it */
    text-align: right; /* Align it with the character counter */
}

/* --- STYLES FOR UPSELL FEATURE LIST --- */

.upsell-feature-list {
    list-style: none; /* Remove default bullet points */
    padding-left: 0;
    margin-top: 1rem;
}

.upsell-feature-list li {
    display: flex; /* Use flexbox for easy alignment */
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center; /* Vertically centers the items */
    
    padding: 10px 15px;
    background-color: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.upsell-feature-list .tutorial-icon-link {
    display: inline-block; /* Make the link a block for proper sizing */
    line-height: 0; /* Prevents extra space around the image */
    transition: transform 0.2s;
}

.upsell-feature-list .tutorial-icon-link:hover {
    transform: scale(1.1); /* Slight grow effect on hover */
}

/* --- STYLES FOR TIERED UPSELL LIST --- */

.upsell-tier-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns on desktop */
    gap: 1.5rem;
    margin-top: 1rem;
}

.upsell-tier {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.upsell-tier .tier-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* --- START: NEW STYLE FOR "INCLUDES" TEXT --- */
.upsell-tier .includes-text {
    font-size: 0.875rem; /* A bit smaller than the main text */
    font-weight: 500;
    color: #6b7280; /* A muted gray */
    margin: -0.5rem 0 1rem 0; /* Adjust spacing */
}
/* --- END: NEW STYLE --- */

/* Specific theme colors for each tier */
.upsell-tier.pro-tier {
    background-color: #fffaf0; /* Pale Orange */
    border-color: #fed7aa;
}
.upsell-tier.pro-tier .tier-title {
    color: #9a3412; /* Dark Orange */
}

.upsell-tier.business-tier {
    background-color: #f3f4f6; /* Light Gray */
    border-color: #d1d5db;     /* Medium Gray Border */
}
.upsell-tier.business-tier .tier-title {
    color: #1f2937; /* Dark Gray/Almost Black Text */
}

/* Responsive: Stack the columns on mobile */
@media (max-width: 768px) {
    .upsell-tier-wrapper {
        grid-template-columns: 1fr; /* A single column */
    }
}

/* --- NEW: Style for Legend with Tutorial Link --- */
.legend-with-tutorial {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* <-- THIS IS THE FIX */
    gap: 12px; /* <-- ADD THIS for spacing */
    width: 100%; /* Ensure the legend takes full width */
}

/*
  This is now a GLOBAL rule for any tutorial icon link.
  It is no longer nested inside .upsell-feature-list.
*/
.tutorial-icon-link {
    display: inline-block;
    line-height: 0;
    transition: transform 0.2s;
    flex-shrink: 0; /* Prevents the icon from shrinking in a flex container */
}

.tutorial-icon-link:hover {
    transform: scale(1.1);
}

.tutorial-icon-link img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}
/* --- END: THE FIX --- */

/* ==================================== */
/* --- STYLES FOR EMMA VIDEO AVATAR --- */
/* ==================================== */

.emma-video-container {
    /* Center the container */
    margin: 0 auto 1.5rem auto;
    
    /* Define the size of the circle */
    width: 120px;
    height: 120px;
    
    /* The magic for creating the circle */
    border-radius: 50%;
    overflow: hidden; /* This clips the video into the circular shape */
    
    /* A subtle border and shadow to make it pop */
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    
    /* (Optional) A subtle background color in case the video loads slowly */
    background-color: #e5e7eb;
}

.emma-video {
    /* Ensure the video fills the circular container */
    width: 100%;
    height: 100%;
    
    /* This is key: it scales the video to fill the space without stretching */
    object-fit: cover;
}

/* --- START: PWA FIX FOR EMMA VIDEO AVATAR --- */

/*
  This media query ONLY applies when the app is running as an installed PWA.
  It forcefully overrides any conflicting styles that cause the video
  container to expand incorrectly.
*/
@media all and (display-mode: standalone) {
    .emma-video-container {
        width: 120px !important;
        height: 120px !important;
        
        /* Re-asserting these helps prevent layout shifts */
        flex-shrink: 0 !important;
        margin: 0 auto 1.5rem auto !important;
    }
}

/* --- END: PWA FIX --- */

/* /login/css/edit_form_style.css */

/* --- STYLES FOR LIVE PREVIEW REMINDER MODAL --- */

#live-preview-modal .modal-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dbeafe; /* Light blue */
    color: #2563eb; /* Brand blue */
    border-radius: 50%;
}

#live-preview-modal .modal-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

#live-preview-modal h3 {
    font-size: 1.4rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.keyboard-shortcuts {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
    text-align: left;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.keyboard-shortcuts li {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}

.keyboard-shortcuts li:last-child {
    border-bottom: none;
}

.keyboard-shortcuts code {
    background-color: #e5e7eb;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

/* --- NEW: Style for Modal Action Buttons --- */
#live-preview-modal .modal-actions {
    margin-top: 2rem; /* Add some space above the button */
    text-align: center; /* Ensure the button is centered */
}

/* =================================================================== */
/* --- V2: RESPONSIVE STYLES FOR ADMIN TABLES --- */
/* =================================================================== */

@media (max-width: 768px) {
    /* This applies to all tables inside the media list container */
    .media-list-container .media-table {
        border: none; /* Remove the main table border */
        box-shadow: none; /* Remove shadow on mobile */
    }

    .media-list-container .media-table thead {
        /* 1. HIDE THE TABLE HEADERS on mobile */
        display: none;
    }

    .media-list-container .media-table tr {
        /* 2. MAKE EACH ROW A CARD */
        display: block; /* Change from table-row to block */
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        background-color: #fff;
    }

    .media-list-container .media-table td {
        /* 3. STACK THE CELLS VERTICALLY */
        display: block; /* Change from table-cell to block */
        text-align: right; /* Align the content to the right */
        position: relative;
        padding-left: 50%; /* Make space for the label */
        border: none; /* Remove cell borders */
        padding-bottom: 0.75rem;
    }
    
    .media-list-container .media-table td:last-child {
        padding-bottom: 0;
    }

    /* 4. USE PSEUDO-ELEMENTS to CREATE LABELS */
    .media-list-container .media-table td::before {
        content: attr(data-label); /* Get the label from the data-label attribute */
        position: absolute;
        left: 1rem;
        width: calc(50% - 2rem); /* Control the width of the label */
        text-align: left;
        font-weight: 600;
        color: #1f2937;
    }
    
    /* 5. Right-align the action buttons cell */
    .media-list-container .media-table td.actions-cell {
        padding-left: 0; /* No label for this one */
        text-align: center; /* Center the buttons */
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid #f3f4f6;
    }
    .media-list-container .media-table td.actions-cell::before {
        display: none; /* Hide the "Actions" label */
    }
}

/* ========================================= */
/* --- NEW: UNLOCK MODAL & BUTTON STYLES --- */
/* ========================================= */

/* 1. Modal Button Width Fix */
/* This targets the buttons inside the unlock cards specifically */
.unlock-card .btn {
    width: auto !important; /* Override any 100% width rules */
    min-width: 140px; /* Ensure a decent minimum size */
    max-width: 100%; /* Prevent overflowing the card */
    box-sizing: border-box; 
    display: inline-block;
    padding: 10px 20px;
}

/* 2. Re-apply "Locked" Visuals to the New Trigger Class */
/* This ensures the tabs look greyed out and clickable */
.trigger-unlock-modal {
    color: #9ca3af !important; /* Muted gray text */
    cursor: pointer !important;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-weight: 500;
    transition: all 0.2s ease;
}

.trigger-unlock-modal:hover {
    color: #374151 !important; /* Darken text on hover */
    opacity: 1;
    background-color: #f9fafb; /* Subtle hover background */
}

.trigger-unlock-modal .lock-icon {
    margin-left: auto; /* Push the lock icon to the far right */
    font-size: 0.9em;
    opacity: 0.7;
}

/* 3. Unlock Options Grid (Responsive) */
.unlock-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

@media (max-width: 600px) {
    .unlock-options-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }
    
    .unlock-card {
        margin-bottom: 15px;
    }
}

/* 4. Unlock Card Styles */
.unlock-card {
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    /* Ensure the card has a background to stand out */
    background-color: #fff; 
}

/* Specific theme for Credit Card */
.unlock-card.credit-theme {
    border: 2px solid #d946ef;
    background-color: #fdf4ff;
}

/* Specific theme for Subscribe Card */
.unlock-card.subscribe-theme {
    border: 2px solid #28a745;
}

/* --- Business Unlock Button Theme --- */
.business-unlock-btn {
    background-color: #374151 !important; /* Dark Gray */
    color: white !important;
    width: 100%;
}

.business-unlock-btn:hover {
    background-color: #1f2937 !important; /* Almost Black on hover */
}

/* --- Profile Completion Progress Bar --- */
.profile-progress-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.profile-progress-box h3 {
    margin-top: 0;
    color: #343a40;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e7ff; /* Light blue base */
    border-radius: 5px;
    height: 15px;
    overflow: hidden; /* Ensures progress bar is clipped correctly */
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #10b981; /* Brand blue fill */
    width: 0%; /* Initial width */
    border-radius: 5px;
    transition: width 0.5s ease-out; /* Smooth animation */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5px;
    box-sizing: border-box;
    font-size: 0.75rem;
    color: white;
    font-weight: bold;
}

.progress-message {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 15px;
}

.progress-message .reward-text {
    color: #7b248a; /* Magenta for reward */
    font-weight: bold;
}
.progress-message .completion-text {
    color: #2563eb; /* Blue for completion */
    font-weight: bold;
}

/* Specific styling for the 'Earned' state */
.progress-message.earned .reward-text {
    color: #065f46;
}

/* ============================================================== */
/* --- START: BUTTON "READY" PULSE ANIMATION --- */
/* ============================================================== */

@keyframes readyPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); /* Green glow */
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(40, 167, 69, 0); /* Fades out */
        transform: scale(1.03); /* Slight bulge */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
        transform: scale(1);
    }
}

/* We apply this class via JS when both the PDF and Title are ready */
.btn-ready-pulse {
    animation: readyPulseGlow 2s infinite !important;
    background-color: #28a745 !important; /* Ensure it stays a strong green */
    color: white !important;
    border: none !important;
    transition: none; /* Disable standard hover transitions while pulsing to prevent stutter */
}

/* Stop pulsing if they hover over it (optional, feels more responsive) */
.btn-ready-pulse:hover {
    animation: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}
/* ============================================================== */
/* --- END: BUTTON "READY" PULSE ANIMATION --- */
/* ============================================================== */

/* ---------------- 
VISUAL STYLE PICKER
---------------- */
.c-style-picker {
    display: flex;
    gap: 12px;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.style-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-btn svg {
    width: 24px;
    height: 24px;
    fill: #64748b;
}

.style-icon-box {
    width: 20px;
    height: 15px;
}

/* Active State */
.style-btn.active {
    border-color: #bf1932;
    background: #fff5f5;
}

.style-btn.active svg {
    fill: #bf1932;
}

.style-btn:hover:not(.active) {
    border-color: #94a3b8;
}