/**
 * Preview CSS - Styles for the HTML preview in the converter app
 * This file can be modified independently for the preview functionality
 * The generated HTML will use the main project's style.css
 */

@import url(https://fonts.googleapis.com/css?family=Montserrat:300,400,400i,500,500i,600,600i,700,700i,800|Open+Sans:400,400i,600,600i,700,700i,800&display=swap);

/* ========================================
   Document Preview Container Styles
   These styles apply within the preview area
   ======================================== */

.document-preview {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    color: #5c5c5c;
    background-color: #fff;
    padding: 15px;
}

.document-preview h1,
.document-preview h2,
.document-preview h3,
.document-preview h4,
.document-preview h5,
.document-preview h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #232323;
    margin-bottom: 10px;
}

.document-preview h1 { font-size: 32px; line-height: 40px; }
.document-preview h2 { font-size: 24px; line-height: 32px; }
.document-preview h3 { font-size: 18px; line-height: 24px; }
.document-preview h4 { font-size: 16px; line-height: 22px; }
.document-preview h5 { font-size: 14px; }

.document-preview p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Container */
.document-preview .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Border page - content wrapper */
.document-preview .border-page {
    border: 1px solid #9b6d07;
    padding: 20px;
}

/* Row and columns (Bootstrap-like grid) */
.document-preview .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.document-preview .col-md-12,
.document-preview .col-lg-12 { flex: 0 0 100%; max-width: 100%; padding: 0 10px; }
.document-preview .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 10px; }
.document-preview .col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 10px; }
.document-preview .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 10px; }
.document-preview .col-md-3 { flex: 0 0 25%; max-width: 25%; padding: 0 10px; }

/* Template title */
.document-preview .template-title {
    margin-bottom: 15px;
}

.document-preview .template-title.text-center {
    text-align: center;
}

/* Main H2 and intro subtitle */
.document-preview .main-h2,
.document-preview .into-sub-title {
    font-size: 24px;
    font-weight: 600;
    color: #232323;
    position: relative;
}

/* White background section */
.document-preview .white-bg,
.document-preview .scroll-new {
    background-color: #fff;
}

.document-preview .section-padding,
.document-preview section {
    padding: 15px 0;
}

/* Table styling - matches old style */
.document-preview .spe-table,
.document-preview .table.spe-table {
    width: 100%;
    color: #5c5c5c;
    border-color: #fff;
    border-collapse: collapse;
    margin: 15px 0;
}

.document-preview .spe-table td.her1,
.document-preview .spe-table td {
    padding: 8px 15px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.document-preview .spe-table tr:nth-child(odd) {
    background: #ededed;
}

.document-preview .spe-table tr:nth-child(even) {
    background: #fff;
}

/* General table styling */
.document-preview table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.document-preview th,
.document-preview td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.document-preview th {
    background-color: #ededed;
}

/* Labels and strong text */
.document-preview label {
    font-weight: 600;
    margin-bottom: 5px;
    display: inline-block;
}

.document-preview label strong {
    font-weight: 700;
}

/* Lists */
.document-preview ul,
.document-preview ol {
    margin: 0 0 1em 0;
    padding-left: 20px;
}

.document-preview ul {
    list-style-type: disc;
}

.document-preview ol {
    list-style-type: decimal;
}

.document-preview li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Links */
.document-preview a {
    color: #9b6d07;
    text-decoration: none;
    transition: all 0.3s ease;
}

.document-preview a:hover {
    color: #7a5506;
    text-decoration: underline;
}

/* Images */
.document-preview img {
    max-width: 100%;
    height: auto;
}

/* Text alignment */
.document-preview .text-center { text-align: center; }
.document-preview .text-right { text-align: right; }
.document-preview .text-left { text-align: left; }
.document-preview .text-justify { text-align: justify; }

/* Banner area */
.document-preview .banner-area {
    background-color: #4a5568;
    padding: 15px 0;
    background-size: cover;
    background-position: center;
    margin: -15px -15px 15px -15px;
}

.document-preview .banner-text {
    text-align: left;
}

.document-preview .banner-heading {
    margin: 0;
}

/* Breadcrumb */
.document-preview .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background-color: transparent;
}

.document-preview .breadcrumb.justify-content-center {
    justify-content: center;
}

.document-preview .breadcrumb-item {
    font-size: 13px;
    color: #fff;
}

.document-preview .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
    color: #cbd5e0;
}

.document-preview .breadcrumb-item a {
    color: #fbbf24;
    text-decoration: none;
}

.document-preview .breadcrumb-item a:hover {
    text-decoration: underline;
    color: #f59e0b;
}

.document-preview .breadcrumb-item.active {
    color: #e2e8f0;
}

/* Header */
.document-preview .header-two {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin: -15px -15px 15px -15px;
}

.document-preview .site-navigation .container {
    position: relative;
}

.document-preview .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 15px;
}

.document-preview .logo img {
    max-height: 40px;
}

.document-preview .navbar-nav,
.document-preview .nav.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.document-preview .nav-item .nav-link {
    color: #232323;
    font-weight: 500;
    padding: 5px 10px;
    text-decoration: none;
    font-size: 13px;
}

.document-preview .nav-item.active .nav-link,
.document-preview .nav-item:hover .nav-link {
    color: #9b6d07;
}

/* Footer */
.document-preview .footer,
.document-preview .footer.bg-overlay {
    background: #000;
    color: #fff;
    padding: 15px;
    margin: 15px -15px -15px -15px;
}

.document-preview .footer p {
    color: #fff;
    font-size: 11px;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Body inner wrapper */
.document-preview .body-inner {
    overflow: hidden;
}

/* Section content */
.document-preview .content.white-bg {
    padding: 15px 0;
}

/* Navbar collapse - hide on preview */
.document-preview .navbar-toggler {
    display: none;
}

.document-preview .collapse.navbar-collapse {
    display: flex !important;
}

/* ========================================
   Image Row Styles
   For side-by-side images (up to 3)
   ======================================== */

.document-preview .img-row {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.document-preview .img-row.text-center {
    justify-content: center;
}

.document-preview .img-row.text-right {
    justify-content: flex-end;
}

.document-preview .img-row-1 .img-cell {
    flex: 0 0 100%;
    max-width: 100%;
}

.document-preview .img-row-2 .img-cell {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
}

.document-preview .img-row-3 .img-cell {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
}

.document-preview .img-cell {
    min-width: 0;
}

.document-preview .img-cell img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.document-preview p img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.document-preview p.text-center img {
    margin: 0 auto;
}

.document-preview p.text-right img {
    margin-left: auto;
    margin-right: 0;
}

/* Navigation visibility - show all items in preview */
.document-preview header .navbar-collapse {
    display: block !important;
}

.document-preview header .navbar .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 0;
}

.document-preview header .navbar .nav-item {
    flex-shrink: 0;
}

.document-preview header .navbar .nav-link {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

/* Make navbar responsive in preview */
.document-preview .navbar-expand-lg .navbar-collapse {
    display: flex !important;
}

.document-preview .navbar-expand-lg .navbar-nav {
    flex-wrap: wrap !important;
}

/* Navigation indicator for header */
.document-preview header .navbar .nav {
    position: relative;
}

.document-preview .nav-more-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 20%, rgba(255,255,255,1) 40%);
    padding: 8px 12px 8px 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    z-index: 10;
    cursor: help;
    border-radius: 4px;
}

.document-preview .nav-more-indicator i {
    animation: bounce-right 1.5s ease-in-out infinite;
}

@keyframes bounce-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.document-preview .nav-more-indicator:hover {
    background: linear-gradient(to right, rgba(99,102,241,0.05) 0%, rgba(99,102,241,0.1) 20%, rgba(99,102,241,0.15) 40%);
}
