/* AM Web Tools Manager - Frontend Styles */

body.amwt-body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
}

/* Header */

.amwt-header-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.amwt-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.amwt-logo {
    font-weight: 800;
    font-size: 22px;
    color: #111827;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.amwt-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.amwt-nav-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.amwt-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
    font-size: 14px;
    text-decoration: none;
}

.amwt-btn-outline:hover {
    border-color: #111827;
}

/* Dropdown */

.amwt-dropdown {
    position: relative;
}

.amwt-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background-color: transparent;
    color: #4b5563;
    font-size: 14px;
    cursor: pointer;
}

.amwt-dropdown-toggle:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.amwt-dropdown-caret {
    font-size: 10px;
}

.amwt-dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16);
    padding: 8px 0;
    display: none;
}

.amwt-dropdown:hover .amwt-dropdown-menu {
    display: block;
}

.amwt-dropdown-item {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    color: #111827;
    text-decoration: none;
}

.amwt-dropdown-item:hover {
    background-color: #f3f4f6;
}

.amwt-dropdown-empty {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #9ca3af;
}

/* Mobile menu icon (visual only, no JS toggle) */

.amwt-menu-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 4px;
    cursor: pointer;
}

.amwt-menu-icon {
    width: 20px;
    height: 2px;
    background-color: #111827;
    position: relative;
}

.amwt-menu-icon::before,
.amwt-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background-color: #111827;
}

.amwt-menu-icon::before {
    top: -6px;
}

.amwt-menu-icon::after {
    top: 6px;
}

/* Layout */

.amwt-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.amwt-main {
    width: 100%;
}

.amwt-content-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Hero & archive */

.amwt-archive {
    margin-top: 18px;
}

.amwt-archive-header {
    max-width: 1120px;
    margin: 0 auto 20px;
    padding: 16px 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.amwt-archive-header h1 {
    font-size: 26px;
    margin: 0 0 6px;
}

.amwt-archive-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.amwt-hero {
    text-align: center;
    padding: 36px 16px 28px;
}

.amwt-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.amwt-hero-title {
    font-size: 32px;
    line-height: 1.1;
    margin: 0 0 8px;
}

.amwt-hero-subtitle {
    margin: 0 0 18px;
    color: #6b7280;
}

.amwt-hero-search {
    margin-top: 8px;
    display: flex;
    align-items: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 4px 4px 4px 12px;
    border-radius: 999px;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.amwt-hero-search-icon {
    font-size: 14px;
    color: #9ca3af;
    margin-right: 8px;
}

.amwt-hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 6px 8px;
}

.amwt-hero-search-button {
    padding: 6px 16px;
    border-radius: 999px;
    border: none;
    background-color: #111827;
    color: #f9fafb;
    font-size: 14px;
    cursor: pointer;
}

.amwt-hero-search-button:hover {
    background-color: #1f2937;
}

/* Sections and grid */

.amwt-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.amwt-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.amwt-section-title {
    font-size: 22px;
    margin: 0 0 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.amwt-section-subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.amwt-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.amwt-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 13px;
    color: #111827;
    text-decoration: none;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.1s ease-out;
}

.amwt-category-pill:hover {
    background-color: #111827;
    border-color: #111827;
    color: #f9fafb;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.amwt-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Tool cards */

.amwt-tool-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.amwt-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.13);
}

.amwt-tool-thumb {
    height: 140px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eff6ff;
    font-size: 28px;
    font-weight: 600;
}

.amwt-tool-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.amwt-tool-body {
    padding: 12px 14px 16px;
}

.amwt-single-title {
    font-size: 28px;
    margin: 0 0 12px;
    text-align: center;
}

.amwt-tool-title {
    font-size: 16px;
    margin: 0 0 4px;
}

.amwt-tool-excerpt {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Related tools */

.amwt-related-tools {
    margin-top: 40px;
    margin-bottom: 32px;
    padding-top: 20px;
    padding-bottom: 8px;
    border-top: 1px solid #e5e7eb;
}

/* Pagination */

.amwt-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
}

.amwt-pagination a,
.amwt-pagination span {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #4b5563;
}

.amwt-pagination span.current {
    background-color: #111827;
    color: #f9fafb;
    border-color: #111827;
}

/* Footer */

.amwt-footer {
    margin-top: 32px;
    background-color: #0f172a;
    color: #e5e7eb;
}

.amwt-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.amwt-footer-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
}

.amwt-footer-text {
    font-size: 13px;
    margin: 0;
    color: #d1d5db;
}

.amwt-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amwt-footer-links li + li {
    margin-top: 4px;
}

.amwt-footer-links a {
    font-size: 13px;
    color: #cbd5e0;
    text-decoration: none;
}

.amwt-footer-links a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.amwt-footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 10px 16px 14px;
    font-size: 12px;
    text-align: center;
    color: #9ca3af;
}

/* Ads */

.amwt-ad {
    text-align: center;
    margin: 16px 0;
}

.amwt-ad-top,
.amwt-ad-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Admin list thumbnails */

.column-amwt_thumbnail .amwt-thumb-preview img {
    max-width: 40px;
    height: auto;
    border-radius: 4px;
}

.column-amwt_thumbnail .amwt-thumb-preview {
    margin-bottom: 4px;
}

/* Responsive */

@media (max-width: 640px) {
    .amwt-header-inner {
        padding: 10px 12px;
    }

    .amwt-nav-desktop {
        display: none;
    }

    .amwt-menu-toggle {
        display: inline-flex;
    }

    .amwt-hero {
        padding: 18px 12px 14px;
    }

    .amwt-hero-title {
        font-size: 22px;
    }

    .amwt-hero-subtitle {
        font-size: 12px;
    }

    .amwt-hero-search {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 12px;
        gap: 8px;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
        max-width: 100%;
    }

    .amwt-hero-search-icon {
        display: none;
    }

    .amwt-hero-search-input {
        font-size: 14px;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }

    .amwt-hero-search-button {
        margin-top: 0;
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 8px;
    }

    .amwt-section {
        margin-top: 24px;
        padding-top: 16px;
    }

    .amwt-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .amwt-section-title {
        font-size: 20px;
    }

    .amwt-category-pills {
        gap: 6px;
    }
}