/**
 * TR Marketplace Theme - Additional Styles
 */

/* WordPress Admin Bar Adjustment */
.admin-bar .tr-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .tr-header {
        top: 46px;
    }
}

/* Loading State */
.tr-loading {
    text-align: center;
    padding: 2rem;
    color: var(--tr-gray);
}

/* Form Controls */
.tr-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--tr-gray-light);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tr-form-control:focus {
    outline: none;
    border-color: var(--tr-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Page Header */
.tr-page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--tr-gray-light);
}

.tr-page-header h1 {
    font-size: 2.5rem;
    color: var(--tr-black);
    margin-bottom: 1rem;
}

.tr-page-content {
    line-height: 1.8;
    color: var(--tr-gray-dark);
}

/* Category Select Notice */
.tr-category-select-notice {
    background: var(--tr-gray-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    color: var(--tr-gray);
}

/* App Screenshot Placeholder */
.tr-app-screenshot-placeholder {
    max-width: 800px;
    margin: 0 auto;
    background: var(--tr-gray-light);
    border-radius: 12px;
    padding: 4rem;
    text-align: center;
    color: var(--tr-gray);
    border: 2px dashed var(--tr-gray);
}

/* Post Placeholder Image */
.tr-post-placeholder-image {
    width: 100%;
    height: 200px;
    background: var(--tr-gray-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tr-post-placeholder-image::before {
    content: '\f128';
    font-family: dashicons;
    font-size: 3rem;
    color: var(--tr-gray);
}

/* Scroll Behavior for Header */
.tr-header.scroll-down {
    transform: translateY(-100%);
}

.tr-header.scroll-up {
    transform: translateY(0);
}

/* Widget Styles */
.tr-widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--tr-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tr-widget-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--tr-blue);
}

/* User Menu Styles */
.tr-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tr-user-name {
    color: var(--tr-white);
    font-weight: 500;
}

.tr-auth-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Pagination */
.tr-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.tr-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--tr-white);
    border: 1px solid var(--tr-gray-light);
    border-radius: 6px;
    text-decoration: none;
    color: var(--tr-gray-dark);
    transition: all 0.3s ease;
}

.tr-pagination .page-numbers:hover,
.tr-pagination .page-numbers.current {
    background: var(--tr-blue);
    color: var(--tr-white);
    border-color: var(--tr-blue);
}

/* Breadcrumbs */
.tr-breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--tr-gray);
}

.tr-breadcrumbs a {
    color: var(--tr-blue);
    text-decoration: none;
}

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

.tr-breadcrumbs .separator {
    margin: 0 0.5rem;
}

.tr-breadcrumbs .current {
    color: var(--tr-gray-dark);
}

/* No Content */
.tr-no-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--tr-gray);
}

/* Mobile Sidebar Overlay */
@media (max-width: 1024px) {
    .tr-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }

    .tr-sidebar-overlay.active {
        display: block;
    }
}

/* Dashicons Integration */
.dashicons {
    font-family: dashicons;
    font-size: 20px;
    line-height: 1;
}

/* Accessibility */
.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--tr-white);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--tr-black);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
