/* Landing Page Themes Index Styles */

/* Form Sections - Modal Context */
#themeModal .form-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 20px;
}

#themeModal .form-section:last-child {
    margin-bottom: 0;
}

#themeModal .form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 12px 12px 0 0;
}

#themeModal .form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#themeModal .form-section-title i {
    color: #4F46E5;
    font-size: 14px;
}

#themeModal .form-section-body {
    padding: 20px;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .col-3 {
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
}

.form-row .col-6 {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
}

.form-row .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Color Input */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker {
    width: 40px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--color-gray-300);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

.color-text {
    flex: 1;
    font-family: monospace;
    text-transform: uppercase;
}

/* Textarea */
.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: monospace;
    font-size: 13px;
}

/* Checkbox Label */
.form-label.d-flex {
    display: flex !important;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modal Footer */
.modal-footer-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.modal-footer .btn-outline:first-child {
    margin-right: auto;
}

/* Preview Modal */
.preview-modal-body {
    padding: 0;
}

.preview-section {
    padding: 24px;
    border-bottom: 1px solid var(--color-gray-200);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--color-gray-50);
    border-radius: 8px;
    border: 1px solid var(--color-gray-200);
    min-width: 140px;
}

.swatch-color {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--color-gray-300);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.swatch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.swatch-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-gray-600);
}

.swatch-value {
    font-size: 11px;
    font-family: monospace;
    color: var(--color-gray-500);
    text-transform: uppercase;
}

/* Live Preview Container */
.live-preview-container {
    background: var(--color-gray-100);
    border-radius: 12px;
    padding: 24px;
    min-height: 400px;
}

.preview-landing-page {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-header {
    padding: 32px 24px;
    text-align: center;
}

.preview-logo {
    max-height: 48px;
    max-width: 200px;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.preview-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.preview-form {
    padding: 24px;
}

.preview-form-group {
    margin-bottom: 16px;
}

.preview-form-group:last-child {
    margin-bottom: 0;
}

.preview-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.preview-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    border-width: 1px;
    border-style: solid;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.preview-input-error {
    border-width: 2px;
}

.preview-error-text {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.preview-button {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.preview-button:hover {
    opacity: 0.9;
}

.preview-success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
}

.preview-success-message i {
    font-size: 16px;
}

/* Data Grid Custom Columns */
.theme-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.theme-name {
    font-weight: 500;
}

.theme-default-indicator {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color Preview in Grid */
.color-preview-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.color-dot-more {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--color-gray-600);
}

/* Error Modal */
.error-icon-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.error-icon-wrapper i {
    font-size: 48px;
}

.text-center {
    text-align: center;
}

.justify-center {
    justify-content: center;
}

/* Set Default Button */
.btn-set-default {
    color: var(--color-gray-600);
}

.btn-set-default:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Gap Utility */
.gap-2 {
    gap: 8px;
}

.align-items-center {
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .form-row .col-3,
    .form-row .col-6,
    .form-row .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .color-swatches {
        flex-direction: column;
    }

    .color-swatch {
        min-width: auto;
    }

    .modal-footer-right {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: flex-end;
    }

    .modal-footer {
        flex-wrap: wrap;
    }

    .modal-footer .btn-outline:first-child {
        margin-right: 0;
        margin-bottom: 8px;
        width: 100%;
    }
}
