/* Privateer Publishing - Custom Styles */

/* Newsletter form - comprehensive fixes */
.newsletter-signup-form .mud-grid {
    width: 100% !important;
}

.newsletter-signup-form .mud-item {
    width: 100% !important;
}

@media (min-width: 600px) {
    .newsletter-signup-form .mud-item[class*="sm-6"] {
        width: calc(50% - 12px) !important;
    }
}

.newsletter-signup-form svg,
.newsletter-signup-form .custom-input-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

.newsletter-signup-form .mud-icon-root {
    width: 24px !important;
    height: 24px !important;
    font-size: 24px !important;
}

.newsletter-signup-form .mud-input-control {
    position: relative !important;
    width: 100% !important;
}

.newsletter-signup-form .mud-input-adornment,
.newsletter-signup-form .mud-input-adornment-start {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1 !important;
    padding-left: 0 !important;
}

.newsletter-signup-form .mud-input-adornment svg,
.newsletter-signup-form .mud-input-adornment-start svg,
.newsletter-signup-form .mud-input-adornment-icon svg,
.newsletter-signup-form .mud-icon-root svg {
    fill: rgba(255, 255, 255, 0.9) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.newsletter-signup-form .mud-input-adornment-icon {
    color: rgba(255, 255, 255, 0.9) !important;
}

.newsletter-signup-form .mud-input-root {
    width: 100% !important;
}

.newsletter-signup-form .mud-input-root input,
.newsletter-signup-form input.mud-input-root,
.newsletter-signup-form .mud-input-slot.mud-input-root,
.newsletter-signup-form input.mud-input-slot.mud-input-root,
.newsletter-signup-form .mud-input.mud-input-outlined input,
.newsletter-signup-form .mud-input-outlined .mud-input-root,
.newsletter-signup-form .mud-input-outlined .mud-input-slot,
.newsletter-signup-form .mud-input-outlined input.mud-input-slot {
    color: rgba(255, 255, 255, 0.9) !important;
    padding-left: 56px !important;
    width: 100% !important;
}

.newsletter-signup-form .mud-input-root input::placeholder,
.newsletter-signup-form input.mud-input-root::placeholder,
.newsletter-signup-form .mud-input-slot.mud-input-root::placeholder,
.newsletter-signup-form input.mud-input-slot.mud-input-root::placeholder,
.newsletter-signup-form .mud-input.mud-input-outlined input::placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-root input::placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-slot::placeholder,
.newsletter-signup-form .mud-input-outlined input.mud-input-slot::placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-input-root input::-webkit-input-placeholder,
.newsletter-signup-form input.mud-input-root::-webkit-input-placeholder,
.newsletter-signup-form .mud-input-slot.mud-input-root::-webkit-input-placeholder,
.newsletter-signup-form input.mud-input-slot.mud-input-root::-webkit-input-placeholder,
.newsletter-signup-form .mud-input.mud-input-outlined input::-webkit-input-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-root input::-webkit-input-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-slot::-webkit-input-placeholder,
.newsletter-signup-form .mud-input-outlined input.mud-input-slot::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-input-root input::-moz-placeholder,
.newsletter-signup-form input.mud-input-root::-moz-placeholder,
.newsletter-signup-form .mud-input-slot.mud-input-root::-moz-placeholder,
.newsletter-signup-form input.mud-input-slot.mud-input-root::-moz-placeholder,
.newsletter-signup-form .mud-input.mud-input-outlined input::-moz-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-root input::-moz-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-slot::-moz-placeholder,
.newsletter-signup-form .mud-input-outlined input.mud-input-slot::-moz-placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-input-root input:-ms-input-placeholder,
.newsletter-signup-form input.mud-input-root:-ms-input-placeholder,
.newsletter-signup-form .mud-input-slot.mud-input-root:-ms-input-placeholder,
.newsletter-signup-form input.mud-input-slot.mud-input-root:-ms-input-placeholder,
.newsletter-signup-form .mud-input.mud-input-outlined input:-ms-input-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-root input:-ms-input-placeholder,
.newsletter-signup-form .mud-input-outlined .mud-input-slot:-ms-input-placeholder,
.newsletter-signup-form .mud-input-outlined input.mud-input-slot:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.5) !important;
    width: 100% !important;
}

.newsletter-signup-form .mud-input-outlined-border legend {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 4px !important;
    margin-left: 14px !important;
    max-width: calc(100% - 28px) !important;
}

/* Specific fixes for MudTextField fieldsets */
.newsletter-signup-form .mud-text-field .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-signup-form .mud-text-field .mud-input-outlined-border legend {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 4px !important;
    margin-left: 14px !important;
    max-width: calc(100% - 28px) !important;
}

.newsletter-signup-form .mud-text-field fieldset {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.newsletter-signup-form .mud-text-field fieldset legend {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    background-color: transparent !important;
    margin-left: 14px !important;
    max-width: calc(100% - 28px) !important;
}

.newsletter-signup-form .mud-input-label {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    position: absolute !important;
    top: 0 !important;
    left: 14px !important;
    transform: translateY(-50%) scale(0.75) !important;
    padding: 0 4px !important;
    z-index: 1 !important;
}

.newsletter-signup-form .mud-input-label.mud-input-label-shrink {
    transform: translateY(-50%) scale(0.75) !important;
}

.newsletter-signup-form .mud-input-root input::placeholder,
.newsletter-signup-form .mud-input-root textarea::placeholder,
.newsletter-signup-form input.mud-input-root::placeholder,
.newsletter-signup-form .mud-input-slot.mud-input-root::placeholder,
.newsletter-signup-form input.mud-input-slot.mud-input-root::placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-select .mud-input-root input {
    color: rgba(255, 255, 255, 0.9) !important;
    padding-left: 14px !important;
}

.newsletter-signup-form .mud-select .mud-input-root input::placeholder {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
}

.newsletter-signup-form .mud-select .mud-input-outlined-border legend {
    margin-left: 14px !important;
    max-width: calc(100% - 28px) !important;
}

/* Ensure labels appear inside fieldset border, not outside */
.newsletter-signup-form .mud-input-control {
    position: relative !important;
}

.newsletter-signup-form .mud-input-outlined {
    position: relative !important;
}

/* Base styles */
html, body {
    font-family: 'Lora', Georgia, serif;
}

/* Site logo */
.site-logo {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Navigation */
.nav-link {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin: 0 8px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a6f 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/hero-pattern.svg') repeat;
    opacity: 0.1;
}

.hero-title {
    font-family: 'Cinzel', Georgia, serif;
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-family: 'Lora', Georgia, serif;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-style: italic;
}

/* Book Cards */
.book-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.book-cover {
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
}

.book-cover-placeholder {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Series Cards */
.series-card {
    transition: transform 0.3s ease;
    border-left: 4px solid var(--mud-palette-primary);
}

.series-card:hover {
    transform: translateX(8px);
}

/* Blog Post Cards */
.blog-card {
    transition: box-shadow 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #2f4f4f 0%, #3d6363 100%);
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.newsletter-title {
    font-family: 'Cinzel', Georgia, serif;
    color: #fff;
}

/* Footer */
.footer,
.mud-appbar.footer {
    padding: 1rem 0 1rem 0 !important;
    min-height: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

.footer .mud-appbar,
.mud-appbar.footer {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

.footer .mud-toolbar,
.mud-appbar.footer .mud-toolbar {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
}

.footer .mud-container,
.mud-appbar.footer .mud-container {
    box-sizing: border-box !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    overflow: visible !important;
    padding-bottom: 0.5rem !important;
    height: auto !important;
    max-height: none !important;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}

.footer-column {
    flex: 0 1 auto;
    min-width: 180px;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
}

.footer-column:first-child {
    flex: 0 1 220px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow: visible !important;
    min-height: auto !important;
    max-height: none !important;
}

@media (min-width: 961px) {
    .footer-links {
        max-width: 300px;
    }
    
    .footer-column:last-child .footer-links {
        max-width: 400px;
        max-height: none !important;
    }
}

@media (max-width: 960px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-column {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .footer-links {
        max-height: none;
        max-width: 100%;
    }
}

.footer-heading,
.footer .footer-heading,
.mud-appbar.footer .footer-heading,
.mud-appbar.footer h6.footer-heading,
.mud-appbar.footer .mud-typography.footer-heading {
    font-family: 'Cinzel', Georgia, serif;
    margin-bottom: 0.75rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    line-height: 1.2 !important;
}

.mud-theme-light .footer-heading,
.mud-theme-light .footer .footer-heading,
.mud-theme-light .mud-appbar.footer .footer-heading,
.mud-theme-light .mud-appbar.footer h6.footer-heading,
.mud-theme-light .mud-appbar.footer .mud-typography.footer-heading {
    color: rgba(255, 255, 255, 0.9) !important;
}

.mud-theme-dark .footer-heading,
.mud-theme-dark .footer .footer-heading,
.mud-theme-dark .mud-appbar.footer .footer-heading,
.mud-theme-dark .mud-appbar.footer h6.footer-heading,
.mud-theme-dark .mud-appbar.footer .mud-typography.footer-heading {
    color: rgba(255, 255, 255, 0.9) !important;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7) !important;
    font-style: italic;
    overflow: visible !important;
    word-wrap: break-word !important;
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;
}

.mud-theme-light .footer-text {
    color: rgba(255, 255, 255, 0.7) !important;
}

.mud-theme-dark .footer-text {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-link,
.footer .footer-link,
.mud-appbar.footer .footer-link,
.mud-appbar.footer a.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    margin: 0 !important;
    padding: 0 !important;
    transition: color 0.2s ease;
    overflow: visible !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    white-space: nowrap;
    flex: 0 0 auto;
}

.mud-theme-light .footer-link,
.mud-theme-light .footer .footer-link,
.mud-theme-light .mud-appbar.footer .footer-link,
.mud-theme-light .mud-appbar.footer a.footer-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.mud-theme-dark .footer-link,
.mud-theme-dark .footer .footer-link,
.mud-theme-dark .mud-appbar.footer .footer-link,
.mud-theme-dark .mud-appbar.footer a.footer-link {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-link:hover,
.footer .footer-link:hover,
.mud-appbar.footer .footer-link:hover,
.mud-appbar.footer a.footer-link:hover {
    color: #fff !important;
}

/* Override MudBlazor's default link colors in footer */
.mud-appbar.footer .mud-link,
.mud-appbar.footer a.mud-link,
.mud-appbar.footer .mud-primary-text {
    color: rgba(255, 255, 255, 0.7) !important;
}

.mud-appbar.footer .mud-link:hover,
.mud-appbar.footer a.mud-link:hover {
    color: #fff !important;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5) !important;
    overflow: visible !important;
    word-wrap: break-word !important;
}

.mud-theme-light .footer-copyright {
    color: rgba(255, 255, 255, 0.5) !important;
}

.mud-theme-dark .footer-copyright {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Section Headers */
.section-header {
    font-family: 'Cinzel', Georgia, serif;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--mud-palette-primary);
}

.section-header.centered::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Page Content */
.page-content {
    padding: 3rem 0;
}

/* Main Content - Add bottom padding to prevent footer overlap */
.mud-main-content {
    padding-bottom: 250px !important;
    min-height: calc(100vh - 64px);
}

@media (max-width: 960px) {
    .mud-main-content {
        padding-bottom: 350px !important;
    }
}

/* Blog Content */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content h2 {
    font-family: 'Cinzel', Georgia, serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content blockquote {
    border-left: 4px solid var(--mud-palette-secondary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--mud-palette-text-secondary);
}

/* Amazon Button */
.amazon-button {
    background: linear-gradient(135deg, #ff9900 0%, #ffad33 100%);
    color: #111 !important;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.amazon-button:hover {
    transform: scale(1.02);
}

/* Admin Layout */
.admin-sidebar {
    background: #1a365d;
}

.admin-nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Markdown rendered content */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.markdown-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

/* Page transitions */
.page-enter {
    opacity: 0;
    transform: translateY(10px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
