/**
 * Additional Custom Styles
 * May Mặc Nghi Long Theme
 */

/* Admin Bar Fix */
body.admin-bar .header-main.sticky { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .header-main.sticky { top: 46px; }
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .floating-actions, .breadcrumbs { display: none !important; }
    .site-content { padding-top: 0 !important; }
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Form Messages */
.form-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 13px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Comments Area */
.comments-area {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.comment-list {
    margin-bottom: 2rem;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-author .fn {
    font-weight: 700;
    font-size: 14px;
}

.comment-metadata {
    font-size: 12px;
    color: var(--text-gray);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
}

.comment-reply-link {
    font-size: 12px;
    color: var(--primary-red);
    font-weight: 600;
}

/* Comment Form */
.comment-form {
    margin-top: 2rem;
}

.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-red);
    outline: none;
}

.comment-form .submit {
    background: var(--primary-red);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form .submit:hover {
    background: #c91a21;
}

/* Search Results */
.search-results .search-header {
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.search-results .search-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.search-results .search-header p {
    color: var(--text-gray);
    font-size: 14px;
}

/* Widget Styles */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-red);
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.widget ul li a {
    color: var(--text-gray);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--primary-red);
}

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

.pagination a, .nav-links a,
.pagination span, .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s;
}

.pagination a:hover, .nav-links a:hover {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
}

.pagination .current, .nav-links .current {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
}

/* 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;
}

/* Focus States */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-red);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 999999;
}

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