/* Builder Main Styles */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* Navbar Styles */
.navbar {
    background-color: #fff;
    border-bottom: 2px solid #69adb1;
    margin-bottom: 0;
}

.navbar-brand {
    font-weight: bold;
    color: #69adb1 !important;
    font-size: 1.5em;
}

.navbar-brand i {
    margin-right: 10px;
}

.navbar-nav > li > a {
    color: #333 !important;
}

.navbar-nav > li > a:hover {
    color: #69adb1 !important;
    background-color: transparent !important;
}

.nav-publish {
    background-color: #69adb1 !important;
    color: #fff !important;
    margin: 8px 0 8px 5px;
    border-radius: 4px;
    padding: 6px 15px !important;
}

.nav-publish:hover {
    background-color: #558da5 !important;
}

/* Builder Panel */
.builder-panel {
    background-color: #fff;
    height: calc(100vh - 51px);
    overflow-y: auto;
    padding: 20px 30px;
    border-right: 1px solid #ddd;
}

.builder-panel h2 {
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #69adb1;
}

.builder-panel h2 i {
    margin-right: 10px;
    color: #69adb1;
}

/* Panel Styles */
.panel {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-heading {
    background-color: #f8f9fa !important;
    border-radius: 8px 8px 0 0;
    padding: 12px 15px;
}

.panel-heading h4 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.panel-heading h4 i {
    margin-right: 8px;
    color: #69adb1;
}

.panel-body {
    padding: 15px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px 12px;
    font-size: 0.95em;
}

.form-control:focus {
    border-color: #69adb1;
    box-shadow: 0 0 5px rgba(105, 173, 177, 0.3);
}

input[type="color"].form-control {
    height: 45px;
    padding: 5px;
    cursor: pointer;
}

input[type="file"] {
    padding: 8px 0;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Rich Text Editor */
.rich-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 5px 8px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.rich-editor-toolbar button {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
    color: #555;
    font-size: 0.85em;
    line-height: 1;
}

.rich-editor-toolbar button:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: #333;
}

.rich-editor-toolbar select {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
    outline: none;
}

.rich-editor-toolbar select:focus {
    border-color: #69adb1;
}

.toolbar-separator {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #ddd;
    margin: 0 4px;
}

.rich-editor {
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0 0 4px 4px !important;
    text-align: left;
    line-height: 1.6;
}

.rich-editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

/* Amenities Grid */
.amenities-grid {
    margin-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
}

.amenities-grid .col-xs-6 {
    margin-bottom: 12px;
}

.amenities-grid .checkbox-inline {
    padding-left: 20px;
    font-weight: normal;
    cursor: pointer;
}

.amenities-grid .checkbox-inline input[type="checkbox"] {
    margin-left: -20px;
    cursor: pointer;
}

/* Image Upload Dropzone */
.image-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    background: #fafafa;
}

.image-dropzone:hover {
    border-color: #69adb1;
    background: #f0fafb;
}

.image-dropzone.drag-over {
    border-color: #69adb1;
    background: #e8f6f7;
    border-style: solid;
}

.image-dropzone i {
    font-size: 2.5em;
    color: #69adb1;
    margin-bottom: 10px;
}

.image-dropzone p {
    margin: 3px 0;
}

/* Image Preview */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ddd;
    transition: border-color 0.2s;
}

.image-preview-item:first-child {
    border-color: #69adb1;
    border-width: 3px;
}

.image-preview-item:first-child::after {
    content: 'Cover';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(105, 173, 177, 0.85);
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    text-align: center;
    padding: 2px 0;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.image-preview-item .remove-btn:hover {
    background: #dc3545;
    transform: scale(1.15);
}

/* Preview Panel */
.builder-row {
    display: flex;
    flex-wrap: nowrap;
    height: calc(100vh - 51px);
}

.builder-panel {
    height: 100%;
    overflow-y: auto;
    padding: 15px 25px;
}

.preview-panel {
    background-color: #2c3e50;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #34495e;
    border-radius: 8px 8px 0 0;
}

.preview-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
}

.preview-header h3 i {
    margin-right: 8px;
}

.preview-controls .btn {
    background-color: #4a6278;
    border-color: #4a6278;
    color: #fff;
    margin-left: 5px;
}

.preview-controls .btn:hover,
.preview-controls .btn.active {
    background-color: #69adb1;
    border-color: #69adb1;
}

.preview-container {
    flex: 1;
    background: #1a252f;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 20px;
    overflow: auto;
    min-height: 0;
}

#previewFrame,
.preview-frame {
    background: #fff;
    border: none;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    width: 100%;
    min-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

#previewFrame.mobile,
.preview-frame.mobile {
    width: 375px;
    max-width: 100%;
}

#previewFrame.tablet,
.preview-frame.tablet {
    width: 768px;
    max-width: 100%;
}

#previewFrame.desktop,
.preview-frame.desktop {
    width: 100%;
}

/* Scrollbar Styling */
.builder-panel::-webkit-scrollbar {
    width: 8px;
}

.builder-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.builder-panel::-webkit-scrollbar-thumb {
    background: #69adb1;
    border-radius: 4px;
}

.builder-panel::-webkit-scrollbar-thumb:hover {
    background: #558da5;
}

/* Publishing Plan Cards */
.plan-options {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.plan-card {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
    font-weight: normal;
}

.plan-card input[type="radio"] {
    display: none;
}

.plan-card-inner {
    padding: 20px 15px;
    text-align: center;
}

.plan-card:hover {
    border-color: #69adb1;
}

.plan-card.selected {
    border-color: #69adb1;
    background: #f0fafb;
    box-shadow: 0 0 0 1px #69adb1;
}

.plan-badge {
    display: inline-block;
    background: #69adb1;
    color: #fff;
    font-size: 0.7em;
    padding: 2px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge-pro {
    background: #f0ad4e;
}

.plan-card h5 {
    margin: 8px 0 5px;
    font-size: 1.1em;
    font-weight: 600;
}

.plan-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #69adb1;
    margin: 5px 0;
}

.plan-price small {
    font-size: 0.4em;
    color: #888;
    font-weight: normal;
}

.plan-desc {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    text-align: left;
}

.plan-features li {
    font-size: 0.82em;
    color: #555;
    padding: 3px 0;
}

.plan-features li i {
    color: #69adb1;
    margin-right: 5px;
    width: 14px;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .builder-row {
        flex-wrap: wrap;
        height: auto;
    }

    .builder-panel,
    .preview-panel {
        height: auto;
        min-height: 50vh;
        width: 100%;
    }

    .preview-panel {
        margin-top: 20px;
    }

    .plan-options {
        flex-direction: column;
    }

    /* Sticky bottom bar on mobile */
    .mobile-bottom-bar {
        display: flex;
    }

    .builder-panel {
        padding-bottom: 80px;
    }
}

/* Mobile sticky bottom bar */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #69adb1;
    padding: 10px 15px;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.mobile-bottom-bar .btn-mobile-publish {
    background: #69adb1;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 6px;
    flex: 1;
    max-width: 300px;
}

.mobile-bottom-bar .btn-mobile-publish:hover,
.mobile-bottom-bar .btn-mobile-publish:active {
    background: #558da5;
}

.mobile-bottom-bar .btn-mobile-secondary {
    background: transparent;
    color: #69adb1;
    border: 1px solid #69adb1;
    padding: 12px 15px;
    font-size: 1em;
    border-radius: 6px;
    white-space: nowrap;
}
