/*
Theme Name: TPT Bookstore Theme
Description: Custom theme for TPT Bookstore - Component-Based
Version: 1.0.0
Author: TPT Solutions
*/

/* Import component stylesheets */
@import url('./css/components/reset.css');
@import url('./css/components/base.css');
@import url('./css/components/header.css');
@import url('./css/components/navigation.css');
@import url('./css/components/main-content.css');
@import url('./css/components/footer.css');
@import url('./css/components/buttons.css');
@import url('./css/components/forms.css');
@import url('./css/components/comments.css');
@import url('./css/components/requests.css');
@import url('./css/components/responsive.css');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-title a {
    text-decoration: none;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.site-title a:hover {
    transform: translateY(-1px);
}

.main-navigation {
    justify-self: start;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.main-navigation a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 80%;
}

/* Main content */
.site-main {
    min-height: calc(100vh - 200px);
    background: #fff;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero .btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.hero .btn:hover {
    transform: translateY(-2px);
}

/* Content area */
.content-area {
    padding: 2rem;
}

/* Footer */
.site-footer {
    background: #f8f9fa;
    color: #495057;
    border-top: 1px solid #dee2e6;
    padding: 3rem 0 2rem 0;
    margin-top: 3rem;
    font-size: 1.1em;
    line-height: 1.6;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #007cba 0%, #6f42c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3em;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #6f42c1;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #00a32a;
    color: white;
}

.btn-secondary:hover {
    background: #007a1a;
    transform: translateY(-1px);
}

/* User account links */
.account-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-self: end;
    flex-wrap: nowrap;
}

.account-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
}

.account-links .login,
.account-links .register {
    color: #007cba;
    font-weight: 500;
}

.account-links .referral-link {
    color: #28a745;
    font-weight: 600;
}

.account-links .referral-link:hover {
    color: #1e7e34;
}

.account-links .referral-count {
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Blog Navigation */
.blog-navigation {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-self: end;
}

.blog-nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.blog-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.blog-nav-link:hover::before {
    left: 0;
}

.blog-nav-link:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Comments */
.comments-area {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comments-title {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007cba;
}

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

.comment {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comment-author {
    font-weight: 600;
    color: #007cba;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 1rem;
}

.comment-content {
    line-height: 1.6;
    color: #495057;
}

.comment-reply-link {
    color: #007cba;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    margin-top: 0.5rem;
    display: inline-block;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

.no-comments {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* Comment Form */
.comment-form {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.comment-form-comment {
    margin-bottom: 1.5rem;
}

.comment-form-comment label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 1rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-submit {
    text-align: center;
    margin-top: 1.5rem;
}

.form-submit input[type="submit"] {
    background: #007cba;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-submit input[type="submit"]:hover {
    background: #005a87;
}

/* Hide Sidebar Completely */
aside,
.sidebar,
.tpt-sidebar-widgets,
#secondary {
    display: none !important;
}

.site-main {
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-content {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
    }

    .site-title {
        grid-column: 1;
        grid-row: 1;
    }

    .account-links {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .main-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
    }

    .blog-navigation {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 1.5rem;
    }

    .header-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }

    .site-title,
    .main-navigation,
    .blog-navigation,
    .account-links {
        grid-column: 1;
        justify-self: center;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }

    .main-navigation a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .blog-navigation {
        justify-content: center;
        flex-wrap: wrap;
    }

    .blog-nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .account-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .comments-area {
        padding: 1rem;
    }

    .comment-form {
        padding: 1rem;
    }

    .comment-form-author,
    .comment-form-email,
    .comment-form-url {
        margin-bottom: 1rem;
    }
}

/* Book Requests Styles */
.tpt-book-requests {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Example Submissions */
.tpt-request-examples {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tpt-request-examples h3 {
    color: #495057;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.tpt-examples-intro {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
    font-style: italic;
}

.tpt-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tpt-example-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tpt-example-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tpt-example-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f8f9fa;
}

.tpt-example-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.tpt-example-header h4 {
    margin: 0;
    color: #007cba;
    font-size: 1.1em;
    font-weight: 600;
}

.tpt-example-content p {
    margin: 8px 0;
    line-height: 1.5;
    color: #495057;
}

.tpt-example-content strong {
    color: #007cba;
    font-weight: 600;
}

.tpt-examples-cta {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.tpt-examples-cta p {
    color: #28a745;
    font-weight: 500;
    margin: 0;
}

.tpt-requests-header {
    text-align: center;
    margin-bottom: 30px;
}

.tpt-requests-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.tpt-requests-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    font-size: 0.9em;
    color: #666;
}

.tpt-requests-stats span {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
}

.tpt-submit-request-section {
    text-align: center;
    margin: 30px 0;
}

.tpt-limit-reached {
    color: #856404;
    background: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    display: inline-block;
}

.tpt-request-form {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tpt-request-form h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.tpt-form-section {
    margin-bottom: 25px;
}

.tpt-form-section h4 {
    margin-bottom: 15px;
    color: #007cba;
    font-size: 1.1em;
}

.tpt-tropes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
}

.tpt-trope-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f8f9fa;
}

.tpt-trope-instruction {
    text-align: center;
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
    font-style: italic;
}

.tpt-trope-label {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    padding: 12px;
}

.tpt-trope-label input[type="checkbox"] {
    margin: 0;
}

.trope-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.trope-name {
    font-weight: bold;
    color: #333;
}

.trope-description {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
}

.trope-rank {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.trope-rank:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.trope-rank:enabled:hover {
    border-color: #007cba;
    background: #f0f8ff;
}

.trope-rank option:disabled {
    color: #ccc;
}

.tpt-character-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.tpt-field {
    display: flex;
    flex-direction: column;
}

.tpt-field label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.tpt-field input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.tpt-request_notes {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s ease;
}

.tpt-request_notes:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tpt-word-count {
    text-align: right;
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.tpt-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.tpt-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.tpt-requests-list {
    margin-top: 40px;
}

.tpt-requests-list h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.tpt-request-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.tpt-request-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tpt-request-item.user-voted {
    border-color: #007cba;
    background: #f8f9ff;
}

.tpt-request-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.tpt-request-votes {
    flex-shrink: 0;
}

.tpt-vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.tpt-vote-btn:hover {
    border-color: #007cba;
    background: #e8f4fd;
}

.tpt-vote-btn.voted {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.tpt-vote-btn .vote-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.tpt-vote-btn .vote-count {
    font-size: 1.1em;
    font-weight: bold;
}

.tpt-request-content {
    flex: 1;
}

.tpt-request-characters {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
}

.tpt-request-tropes {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tpt-request-notes {
    color: #666;
    font-style: italic;
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.tpt-request-footer {
    margin-top: 15px;
    text-align: right;
}

.tpt-request-date {
    color: #999;
    font-size: 0.85em;
}

/* Dashboard styles */
.tpt-dashboard-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tpt-dashboard-section h3 {
    margin-bottom: 15px;
    color: #007cba;
}

.tpt-requests-preview {
    text-align: center;
}

.tpt-top-requests {
    margin: 15px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.tpt-top-requests li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.tpt-top-requests li:last-child {
    border-bottom: none;
}

/* Request share link */
.tpt-request-share-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #007cba;
    font-size: 0.85em;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.tpt-request-share-link:hover {
    background: #f0f8ff;
    text-decoration: underline;
}

.tpt-request-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* User mini badges in request items */
.tpt-user-mini-badges {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.tpt-mini-badge {
    font-size: 14px;
    cursor: help;
    transition: transform 0.2s ease;
}

.tpt-mini-badge:hover {
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .tpt-requests-stats {
        flex-direction: column;
        align-items: center;
    }

    .tpt-request-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tpt-character-fields {
        grid-template-columns: 1fr;
    }

    .tpt-form-actions {
        flex-direction: column;
    }

    .tpt-tropes-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .tpt-trope-label {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .trope-rank {
        grid-column: 1 / -1;
        justify-self: end;
        margin-top: 8px;
    }

    .tpt-request-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
