/* ============================================
   AI TEMPLATE HUB - CUSTOM STYLES
   Additional styles for specific components
   ============================================ */

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 27, 75, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    position: relative;
}

.search-overlay .search-form {
    display: flex;
    gap: 12px;
}

.search-overlay .search-field {
    flex: 1;
    padding: 20px 24px;
    font-size: 1.3rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.search-overlay .search-field::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-overlay .search-field:focus {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.15);
}

.search-overlay .search-submit {
    padding: 20px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-overlay .search-submit:hover {
    background: var(--primary-dark);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-close:hover {
    opacity: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light-color);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-light);
}

/* Single Post Styles */
.single-post-content .entry-content h2,
.single-post-content .entry-content h3,
.single-post-content .entry-content h4 {
    color: var(--dark-color);
    margin: 32px 0 16px;
}

.single-post-content .entry-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.single-post-content .entry-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.single-post-content .entry-content p {
    margin-bottom: 20px;
}

.single-post-content .entry-content ul,
.single-post-content .entry-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.single-post-content .entry-content ul {
    list-style: disc;
}

.single-post-content .entry-content ol {
    list-style: decimal;
}

.single-post-content .entry-content li {
    margin-bottom: 8px;
}

.single-post-content .entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-light);
}

.single-post-content .entry-content img {
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.single-post-content .entry-content pre {
    background: var(--dark-color);
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 24px 0;
}

.single-post-content .entry-content code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.single-post-content .entry-content pre code {
    background: none;
    color: white;
    padding: 0;
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 24px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    padding: 24px;
    background: var(--light-color);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-dark);
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.comment-reply-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Comment Form */
.comment-respond {
    margin-top: 40px;
    padding: 32px;
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.comment-reply-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    margin-bottom: 16px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .submit {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Sidebar Widgets */
.widget {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget_search .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
}

.widget_search .search-field:focus {
    border-color: var(--primary-color);
}

.widget_search .search-submit {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

/* Page Links */
.page-links {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-links > span {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.page-links > a {
    padding: 8px 16px;
    background: var(--light-color);
    color: var(--text-dark);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-links > a:hover {
    background: var(--primary-color);
    color: white;
}

/* Admin Order Badge */
.wp-list-table .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.wp-list-table .badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.wp-list-table .badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.wp-list-table .badge-info {
    background: rgba(99, 102, 241, 0.1);
    color: #3730a3;
}

/* WhatsApp Float Pulse Animation */
.whatsapp-float.pulse {
    animation: whatsappPulse 1s ease;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Template Filter Active State */
.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Payment Option Selected State */
.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Mobile Menu Open State */
body.menu-open {
    overflow: hidden;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Skip Link */
.skip-link {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    left: 50%;
    padding: 12px 24px;
    position: absolute;
    transform: translateX(-50%);
    transition: transform 0.3s;
    z-index: 100000;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    top: -100%;
}

.skip-link:focus {
    top: 0;
}

/* Custom Logo */
.custom-logo {
    max-height: 40px;
    width: auto;
}

/* Post Thumbnail Hover */
.post-thumbnail img,
.page-thumbnail img {
    transition: transform 0.5s ease;
}

.post-thumbnail:hover img,
.page-thumbnail:hover img {
    transform: scale(1.02);
}

/* Entry Meta */
.entry-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.entry-meta a {
    color: var(--primary-color);
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-previous,
.nav-next {
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    color: var(--text-dark);
}

/* Archive Header */
.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Search Results */
.search-results .templates-grid {
    margin-top: 40px;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-404 .page-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
}

.error-404 h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 20px 0;
}

.error-404 p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success Message */
.payment-success {
    text-align: center;
    padding: 40px;
}

.payment-success svg {
    width: 64px;
    height: 64px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.payment-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.payment-success p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* Bank Details Box */
.bank-details-box {
    background: var(--light-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
}

.bank-details-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.bank-details-box p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-family: monospace;
    background: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Copy Button */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Template Preview Iframe */
.template-preview-frame {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .search-overlay .search-field {
        font-size: 1.1rem;
        padding: 16px 20px;
    }

    .search-overlay .search-submit {
        padding: 16px 24px;
    }

    .single-post-content .entry-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .search-overlay .search-form {
        flex-direction: column;
    }

    .search-overlay .search-field,
    .search-overlay .search-submit {
        width: 100%;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }

    .single-post-content .entry-title {
        font-size: 1.6rem;
    }

    .comments-area {
        padding: 0;
    }

    .comment-respond {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .search-overlay {
        padding: 10px;
    }

    .search-close {
        top: -40px;
        font-size: 2rem;
    }

    .widget {
        padding: 16px;
    }

    .single-post-content .entry-title {
        font-size: 1.4rem;
    }

    .entry-content {
        font-size: 1rem !important;
    }
}
