/* Light/Dark Mode Toggle Generator Styles */
.tool-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #212529;
}

.tool-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.preview-container {
    min-height: 300px;
    background-color: #ffffff;
    color: #212529;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.preview-container.dark-mode {
    background-color: #1a1a1a;
    color: #f8f9fa;
}

.preview-content {
    transition: all 0.3s ease;
}

.mode-toggle-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 10;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch.sm {
    width: 50px;
    height: 28px;
}

.toggle-switch.lg {
    width: 70px;
    height: 40px;
}

.toggle-switch.xl {
    width: 80px;
    height: 46px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch.sm .toggle-slider:before {
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
}

.toggle-switch.lg .toggle-slider:before {
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
}

.toggle-switch.xl .toggle-slider:before {
    height: 38px;
    width: 38px;
    left: 4px;
    bottom: 4px;
}

input:checked + .toggle-slider {
    background-color: #4e73df;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch.sm input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch.lg input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-switch.xl input:checked + .toggle-slider:before {
    transform: translateX(34px);
}

/* Toggle Button Styles */
.toggle-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #4e73df;
    color: white;
    transition: all 0.3s ease;
}

.toggle-button.sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.toggle-button.lg {
    padding: 10px 20px;
    font-size: 1.125rem;
}

.toggle-button.xl {
    padding: 12px 24px;
    font-size: 1.25rem;
}

.toggle-button:hover {
    background-color: #3a5bc7;
}

/* Toggle Checkbox Styles */
.toggle-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-checkbox.sm {
    font-size: 0.875rem;
}

.toggle-checkbox.lg {
    font-size: 1.125rem;
}

.toggle-checkbox.xl {
    font-size: 1.25rem;
}

.toggle-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.toggle-checkbox.sm input {
    width: 16px;
    height: 16px;
}

.toggle-checkbox.lg input {
    width: 20px;
    height: 20px;
}

.toggle-checkbox.xl input {
    width: 22px;
    height: 22px;
}

/* Icon Toggle Styles */
.toggle-icon {
    cursor: pointer;
    font-size: 24px;
    padding: 8px;
    color: #212529;
    transition: all 0.3s ease;
}

.toggle-icon.sm {
    font-size: 20px;
    padding: 6px;
}

.toggle-icon.lg {
    font-size: 28px;
    padding: 10px;
}

.toggle-icon.xl {
    font-size: 32px;
    padding: 12px;
}

.dark-mode .toggle-icon {
    color: #4e73df;
}

/* Position Classes */
.toggle-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
}

.toggle-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
}

.toggle-bottom-right {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.toggle-bottom-left {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.toggle-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Animation Classes */
.no-animate {
    transition: none !important;
}

.no-page-animate .dark-mode {
    transition: none !important;
}

/* Code Display Styles */
pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .preview-container {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .preview-container {
        min-height: 200px;
    }
}

/* Dark mode styles for the tool itself */
body.dark-mode .tool-container,
body.dark-mode .card,
body.dark-mode .preview-container:not(.dark-mode) {
    background-color: #2d3748;
    color: #f8f9fa;
}

body.dark-mode .card-header {
    background-color: #1a365d !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .accordion-button:not(.collapsed) {
    background-color: #4a5568;
    color: #f8f9fa;
    border-color: #4a5568;
}

body.dark-mode .form-text,
body.dark-mode .text-muted {
    color: #cbd5e0 !important;
}

body.dark-mode .accordion-item {
    background-color: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .accordion-button {
    background-color: #2d3748;
    color: #f8f9fa;
}

body.dark-mode pre {
    background-color: #1a202c;
    border-color: #4a5568;
}