.omgsEditor-container * {
    margin: 0;
    padding: 0;
}

.omgsEditor-container {
    position: relative;
    display: block;
    /* flex-direction: column; */
    gap: 8px;
    position: relative;
    margin: auto;
}

.omgsEditor-container canvas {
    max-width: 100%;
    height: auto;
}

.editor-toolbar {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    display: flex;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-group .toolbar-text {
    width: 146px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: all 0.2s;
    line-height: 26px;
}

label.toolbar-btn {
    background: #cc0100;
    color: #fffdfd;
    font-size: 14px;
    padding: 4px;
}

.toolbar-btn:hover {
    background: #f94921;
}

.toolbar-select {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

.toolbar-input {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 60px;
}

.toolbar-color {
    padding: 0;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.editor-toolbar .active {
    background: #000;
    color: #fff;
}

.OMGsEditToolBar {
    min-height: 52px;
}

/* swatches border */
.border-palette {
    padding: 0 8px;
    position: relative;
}

.toolbar-label {
    font-size: 14px;
    margin-bottom: 8px;
}

.border-swatches-container {
    position: relative;
}

#addNewText {
    padding: 4px;
    width: 35px;
    height: 35px;
    line-height: normal;
}

.toolbar-text {
    width: 49%;
    padding: 5px;
    font-size: 16px;
    display: inline-block;
    line-height: 18px;
}

.common-tools {
    display: flex;
    gap: 10px;
}

.common-tools svg {
    border: 1px solid #ccc;
    padding: 2px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.common-tools .activesvg {
    border: 2px solid #0b27ff;
    padding: 2px;
    cursor: pointer;
}

.selected-swatch {
    display: flex;
    align-items: center;
    /* gap: 8px; */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    width: 100%;
}

.border-swatches-dropdown {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    z-index: 1000;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.border-swatches-dropdown.show {
    display: grid;
}

.color-swatch,
.selected-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    position: relative;
}

.color-swatch:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.swatch-color {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#fontSelect {
    z-index: 1000;
    background: white;
    border: 1px solid rgb(204, 204, 204);
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    top: 50px;
    left: 210px;
}

#fontSelect .font-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px;
    border: none;
    background: none;
    font-family: AudioWide;
    cursor: pointer;
}

/* Special styling for transparent swatch */
.swatch-color[style*="00000000"],
.swatch-color-transparent {
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.swatch-label {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    position: absolute;
    top: -7px;
}

/* Add arrow to selected swatch */
.selected-swatch::after {
    content: '';
    border: solid #666;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-left: auto;
    display: none;
}

/* end swatches border */

/* clock */
.clock-container {
    padding: 0;
}

.selected-clockno-style {
    font-family: 'Audiowide', cursive;
    color: #ffffff;
    border: 1px solid #ddd;
    -webkit-text-stroke: 1px #000000;
    background: transparent;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
}

.clock-text-label {
    display: inline-block;
}

#NewClockStyles {
    position: absolute;
    max-height: 500px;
    overflow: auto;
    -ms-overflow-style: none;
    /* For Internet Explorer and Edge */
    scrollbar-width: none;
    margin-top: 7px;
}

/* end clock */

#saveDesignCn {
    background: #cc0100;
    padding: 15px;
    border: 0;
    color: #fcfcfc;
    font-size: 30px;
    cursor: pointer;
    width: 100%;
    line-height: 1em;
}



.unique-error-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    /* Ensure it appears on top */
    padding: 20px;
    border-radius: 12px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    font-family: Arial, sans-serif;
}

.unique-error-popup .unique-popup-content {
    font-size: 16px;
    color: #444;
}

.unique-error-popup .unique-close-popup {
    margin-top: 15px;
    padding: 10px 20px;
    background: #ff4d4d;
    /* Unique red color */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.unique-error-popup .unique-close-popup:hover {
    background: #e60000;
}

#inputText {
    /* position: absolute;
    top: 46px;
    left: 0;
    width: 190px;
    border: 1px solid #eee; */
    max-width: 60%;
    position: absolute;
    border: 1px solid #000000;
    background: #fff;
    z-index: 99;
}

.omgsEditor-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent dark background */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Spinner element */
.omgsEditor-loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spinner animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}






/* Floating text editor - new design */
.floating-text-editor {
    position: fixed;
    background: white;
    border: 2px solid #36c1fc;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    min-width: 300px;
    max-width: 350px;
    display: none;
}

.text-editor-header {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.text-editor-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.text-editor-delete {
    padding: 8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.text-editor-delete:hover {
    background: #c82333;
}

.text-editor-delete:active {
    transform: scale(0.95);
}

.text-editor-done {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.text-editor-done:hover {
    background: #218838;
}


.text-editor-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.text-editor-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

.text-editor-input:focus {
    border-color: #36c1fc;
    box-shadow: 0 0 0 3px rgba(54, 193, 252, 0.1);
}

.text-editor-done {
    padding: 3px 10px;
    background: #000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}

.text-editor-done:hover {
    background: #218838;
}

/* Font Selector with Preview */
.text-editor-font-section {
    margin-bottom: 12px;
}

.text-editor-font-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: block;
    font-weight: 500;
}

.text-editor-font-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-editor-font-select:hover {
    border-color: #36c1fc;
}

.font-preview-text {
    flex: 1;
}

.font-dropdown-arrow {
    margin-left: 8px;
    border: solid #666;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
}

.font-dropdown-menu {
    display: none;
    position: absolute;
    bottom: 66px;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1002;
}

.font-dropdown-menu.active {
    display: block;
}

.font-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.font-option:last-child {
    border-bottom: none;
}

.font-option:hover {
    background: #f8f9fa;
}

.font-option.selected {
    background: #e3f2fd;
    color: #1976d2;
}

/* Color Swatches Section */
.text-editor-color-section {
    margin-bottom: 12px;
}

.text-editor-color-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.color-swatches-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.color-swatch-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.color-swatch-item:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch-item.selected {
    border-color: #36c1fc;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #36c1fc;
}

.color-swatch-item.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Custom color picker */
.custom-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
}

.custom-color-input {
    flex: 1;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

.custom-color-preview {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.custom-color-button {
    padding: 6px 12px;
    background: #36c1fc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.custom-color-button:hover {
    background: #2ba5d6;
}

/* Hide bold and italic buttons */
.text-editor-tool-btn {
    display: none !important;
}

/* Scrollbar styling */
.font-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.font-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.font-dropdown-menu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.font-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Arrow indicator */
.floating-text-editor::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.floating-text-editor[data-position="above"]::after {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.floating-text-editor[data-position="below"]::after {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent white transparent;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.1));
}

/* Responsive */
@media (max-width: 768px) {
    .floating-text-editor {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }

    /* .color-swatches-grid {
        grid-template-columns: repeat(5, 1fr);
    } */
}

/* clock no generateClockStyleChange */
/* Clock Styles Modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.clock-styles-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(6px);
    animation: fadeIn 0.25s ease-out;
    padding: 15px;
    box-sizing: border-box;
}

.clock-styles-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.clock-tab {
    flex: 1;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    backdrop-filter: blur(10px);
}

.clock-tab-icon {
    font-size: 22px;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clock-tab-label {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    opacity: 0.9;
}

.clock-tab:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.clock-tab:hover .clock-tab-icon {
    transform: scale(1.1);
}

.clock-tab.active {
    background: white;
    color: #cc0100;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clock-tab.active .clock-tab-icon {
    transform: scale(1.15);
}

.clock-tab.active .clock-tab-label {
    opacity: 1;
}

.clock-tab-content {
    display: none;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    scroll-behavior: smooth;
    min-height: 0;
    /* Important for flexbox scrolling */
}

.clock-tab-content.active {
    display: flex;
    flex-direction: column;
    animation: fadeInContent 0.3s ease-out;
}

.clock-styles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding-bottom: 16px;
}

.clock-tab-content::-webkit-scrollbar {
    width: 8px;
}

.clock-tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 8px 0;
}

.clock-tab-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cc0100 0%, #ff4444 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}

.clock-tab-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff4444 0%, #cc0100 100%);
    box-shadow: 0 0 8px rgba(204, 1, 0, 0.5);
}

.clock-style-button {
    position: relative;
    padding: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 28px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

.clock-style-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(204, 1, 0, 0.08);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.clock-style-button:hover::before {
    width: 120%;
    height: 120%;
}

.clock-style-button:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: #cc0100;
    box-shadow: 0 8px 20px rgba(204, 1, 0, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    z-index: 1;
}

.clock-style-button:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(204, 1, 0, 0.2);
}

.clock-style-button.selected {
    border-color: #cc0100;
    border-width: 2.5px;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe6e6 100%);
    box-shadow: 0 4px 16px rgba(204, 1, 0, 0.35), inset 0 2px 6px rgba(204, 1, 0, 0.15);
    transform: scale(1.03);
}

.clock-style-button.selected::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #cc0100 0%, #ff4444 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(204, 1, 0, 0.4);
    font-weight: bold;
    animation: checkmark 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2.5px solid white;
}

/* Clock number grid layouts */
.clock-numbers-12 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    height: 100%;
    font-size: 16px;
}

.clock-numbers-4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
    font-size: 20px;
}

.clock-numbers-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
    font-size: 12px;
}

.clock-num {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 480px) {
    .clock-styles-modal {
        padding: 10px;
    }

    .clock-tab {
        padding: 8px 5px;
        gap: 3px;
    }

    .clock-tab-icon {
        font-size: 20px;
    }

    .clock-tab-label {
        font-size: 9px;
    }

    .clock-styles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .clock-style-button {
        font-size: 24px;
        padding: 6px;
    }

    .clock-numbers-12 {
        font-size: 14px;
    }

    .clock-numbers-4 {
        font-size: 18px;
    }

    .clock-numbers-dots {
        font-size: 10px;
    }

    .clock-tab-content {
        padding: 12px;
    }
}

/* end clock no generateClockStyleChange */