/**
 * Offline Page Generator Tool Styles
 * Consistent with App Monkey design language
 */
.header-gradient {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    transition: all 0.3s ease;
}
.glass-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
/* Color Input Wrapper */
.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-wrapper .form-control-color {
    width: 60px;
    height: 42px;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
}

.color-input-wrapper .color-hex-input {
    flex: 1;
    font-family: 'Fira Code', 'Monaco', monospace;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    margin: 0;
}

.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: #e2e8f0;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2563eb;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    color: #64748b;
    font-size: 14px;
}

/* Section Divider */
.section-divider {
    margin: 24px 0;
    border-color: #e2e8f0;
}

/* Preview Browser Frame */
.preview-browser {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.browser-bar {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dots .dot.red {
    background: #ff5f57;
}

.browser-dots .dot.yellow {
    background: #ffbd2e;
}

.browser-dots .dot.green {
    background: #28ca41;
}

.browser-url {
    flex: 1;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Preview Page Styling */
.preview-offline-container {
    text-align: center;
    max-width: 100%;
    background: white;
    padding: 28px 20px;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.preview-logo {
    max-width: 80px;
    max-height: 40px;
    margin-bottom: 16px;
    object-fit: contain;
}

.preview-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-icon svg {
    width: 24px;
    height: 24px;
}

.preview-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.preview-message {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 20px;
}

.preview-retry-btn {
    display: inline-block;
    padding: 10px 24px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: default;
}

.preview-site-name {
    margin-top: 20px;
    font-size: 11px;
    color: #999;
}

/* Code Section */
.embed-code-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.code-step {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.code-step h5 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #1e293b;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

.code-block {
    position: relative;
    margin-top: 12px;
}

.code-block pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    max-height: 300px;
}

.code-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.code-block .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.code-block .copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

/* Info Section */
.info-section {
    background: white;
    border-radius: 16px;
}

.info-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.info-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
}

.info-section p {
    color: #64748b;
    line-height: 1.7;
}

.info-section ul {
    color: #64748b;
    padding-left: 20px;
}

.info-section ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* FAQ Accordion */
.faq-accordion {
    margin-top: 16px;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: #f8fafc;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.faq-item.active .faq-question {
    background: #e0e7ff;
    color: #2563eb;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-answer {
    display: none;
    padding: 16px 20px;
    background: white;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin-bottom: 0;
}

/* Table Styling */
.table {
    font-size: 14px;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
}

/* Alert Styling */
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-radius: 12px;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-radius: 12px;
}

.alert-warning h6 {
    color: #92400e;
}

/* Form Styling Overrides */
.form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    margin-bottom: 6px;
}

.helper-text {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

/* Badge */
.badge-secondary {
    background: #e2e8f0;
    color: #64748b;
    font-weight: 500;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 991px) {
    .preview-browser {
        margin-top: 20px;
    }

    .preview-content {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .code-block pre {
        font-size: 11px;
        padding: 12px;
    }

    .code-step {
        padding: 16px;
    }

    .code-step h5 {
        font-size: 14px;
    }

    .preview-content {
        min-height: 280px;
        padding: 16px;
    }

    .preview-offline-container {
        padding: 20px 16px;
    }

    .faq-question {
        font-size: 14px;
        padding: 14px 16px;
    }

    .color-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .color-input-wrapper .form-control-color {
        width: 100%;
    }
}
