/*
 * filipakis-theme / assets/css/custom.css
 * Additional & enhancement styles — loaded after style.css
 *
 * This file is for: custom blocks, 3rd-party plugin overrides,
 * WooCommerce (if used), print styles, and fine-tuning.
 */

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
.reveal--delay-5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */

.search-form {
    display: flex;
    gap: var(--space-2);
}

.search-field {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast);
}

.search-field:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(1, 105, 111, 0.1);
}

.search-submit {
    padding: var(--space-3) var(--space-5);
    background: var(--color-teal);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-submit:hover {
    background: var(--color-teal-light);
}

/* ==========================================================================
   WORDPRESS CORE ALIGNMENTS
   ========================================================================== */

.alignleft {
    float: left;
    margin-right: var(--space-6);
    margin-bottom: var(--space-4);
}

.alignright {
    float: right;
    margin-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-6);
}

.alignwide {
    margin-left: -4vw;
    margin-right: -4vw;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

/* ==========================================================================
   GUTENBERG BLOCK STYLES
   ========================================================================== */

/* Quote block */
.wp-block-quote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    border-left: 4px solid var(--color-terracotta);
    background: var(--color-surface-2);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-serif);
    font-style: italic;
}

.wp-block-quote cite {
    display: block;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--color-text-4);
}

/* Separator */
.wp-block-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-10) 0;
}

/* Image captions */
.wp-block-image figcaption,
figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-4);
    text-align: center;
    margin-top: var(--space-2);
    font-style: italic;
}

/* Cover block */
.wp-block-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Button block */
.wp-block-button__link {
    background: var(--color-teal);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: background var(--transition-fast);
}

.wp-block-button__link:hover {
    background: var(--color-teal-light);
    color: white;
}

/* Table block */
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.wp-block-table th,
.wp-block-table td {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    text-align: left;
}

.wp-block-table th {
    background: var(--color-surface-2);
    font-weight: 600;
    color: var(--color-text);
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-area {
    margin-top: var(--space-12);
}

.comments-title {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-8);
}

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

.comment {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment-author img {
    border-radius: var(--radius-full);
}

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

.comment-metadata {
    font-size: var(--text-xs);
    color: var(--color-text-4);
}

.comment-content p {
    font-size: var(--text-sm);
    color: var(--color-text-2);
    line-height: 1.7;
}

.comment-reply-link {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-teal);
    margin-top: var(--space-2);
    display: inline-block;
}

/* Comment form */
.comment-form label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-2);
    margin-bottom: var(--space-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    margin-bottom: var(--space-5);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(1, 105, 111, 0.1);
}

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

.form-submit .submit {
    background: var(--color-teal);
    color: white;
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.form-submit .submit:hover {
    background: var(--color-teal-light);
}

/* ==========================================================================
   CATEGORY WIDGET
   ========================================================================== */

.widget_categories ul li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-sm);
    display: flex;
    justify-content: space-between;
}

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

.widget_categories ul li a {
    color: var(--color-text-2);
    transition: color var(--transition-fast);
}

.widget_categories ul li a:hover {
    color: var(--color-teal);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--color-navy);
    color: white;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-toast);
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition-base);
    pointer-events: none;
    max-width: 320px;
}

.toast.toast--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast--success {
    background: var(--color-teal);
}

.toast--error {
    background: #c0392b;
}

/* ==========================================================================
   LOADING SKELETON
   ========================================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-surface-2) 25%,
        var(--color-border) 50%,
        var(--color-surface-2) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .post-sidebar,
    .pagination,
    .btn,
    .restricted-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .entry-content {
        max-width: 100%;
    }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 10pt;
        color: #666;
    }
}

/* ==========================================================================
   EDITOR STYLES (admin)
   ========================================================================== */

.editor-styles-wrapper {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 18px;
    line-height: 1.75;
    color: #1a1a1a;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}
