/**
 * Additional CSS for WordPress integration
 * 
 * @package CEI_Gemology_Theme
 */

/* WordPress Admin Bar */
.admin-bar .navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .navbar {
        top: 46px;
    }
}

/* WordPress Content Styles */
.wp-content {
    line-height: 1.8;
}

.wp-content h1,
.wp-content h2,
.wp-content h3,
.wp-content h4,
.wp-content h5,
.wp-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.wp-content h1:first-child,
.wp-content h2:first-child,
.wp-content h3:first-child,
.wp-content h4:first-child,
.wp-content h5:first-child,
.wp-content h6:first-child {
    margin-top: 0;
}

.wp-content p {
    margin-bottom: 1.5rem;
}

.wp-content ul,
.wp-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.wp-content li {
    margin-bottom: 0.5rem;
}

.wp-content blockquote {
    border-left: 4px solid #cfaa61;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}

.wp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.wp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.wp-content th,
.wp-content td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.wp-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* WordPress Widget Styles */
.widget {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.widget-title {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #cfaa61;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #cfaa61;
}

/* WordPress Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #eee;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.comment-content {
    color: #555;
    line-height: 1.6;
}

.comment-reply-link {
    color: #cfaa61;
    font-size: 0.9rem;
    text-decoration: none;
}

.comment-reply-link:hover {
    color: #b8941f;
}

/* Comment Form */
.comment-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comment-form-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #cfaa61;
}

/* WordPress Search */
.search-form {
    display: flex;
    margin-bottom: 2rem;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px 0 0 5px;
    border-right: none;
}

.search-form .search-submit {
    background: #cfaa61;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form .search-submit:hover {
    background: #b8941f;
}

/* WordPress Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #cfaa61;
    color: white;
    border-color: #cfaa61;
}

/* WordPress Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* WordPress Captions */
.wp-caption {
    max-width: 100%;
    margin: 1rem 0;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* WordPress Embeds */
.wp-embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-embed-responsive iframe,
.wp-embed-responsive object,
.wp-embed-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* WordPress Blocks */
.wp-block-group {
    margin: 2rem 0;
}

.wp-block-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.wp-block-button .wp-block-button__link {
    background: #cfaa61;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.wp-block-button .wp-block-button__link:hover {
    background: #b8941f;
    color: white;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Form Error Styles */
.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .widget {
        padding: 1.5rem;
    }
    
    .comment-form {
        padding: 1.5rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .wp-block-columns {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .notification,
    .comment-form,
    .search-form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .wp-content img {
        max-width: 100% !important;
        height: auto !important;
    }
}
