/* Custom Fonts */
@font-face {
    font-family: 'Munky';
    src: url(/assets/Munky-Bold-9c54f757aa41aa794f855175216434bc2ff28bc89dbef3431eb14aa84f0bcd8b.otf) format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Company Name Font Classes */
.company-name-font {
    font-family: 'Munky', 'Cooper Black', serif;
    font-weight: bold;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
    text-rendering: geometricPrecision;
    font-feature-settings: "liga" 1, "kern" 1;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.01em;
}

/* Image Rendering Optimization */
.image-render-crisp {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
/* Animated Hero Section with Falling Crinkle SVGs - Original Version */

.hero-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 50%, #fb923c 100%);
    min-height: 100vh;
}

.falling-crinkle {
    position: absolute;
    width: 60px;
    height: 36px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
    will-change: transform, opacity;
    transform: translateZ(0);
    /* Hardware acceleration */
}

/* All crinkles are now dynamic and styled by JavaScript */
.falling-crinkle.dynamic {
    animation: fall linear;
    /* Individual properties set by JavaScript */
}

.falling-crinkle.dynamic.float {
    animation: float-fall linear;
    /* Individual properties set by JavaScript */
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Floating animation for some crinkles */
@keyframes float-fall {
    0% {
        transform: translateY(-100px) translateX(0px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    50% {
        transform: translateY(50vh) translateX(20px) rotate(180deg);
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(100vh) translateX(-20px) rotate(360deg);
        opacity: 0;
    }
}

/* Hero content styling */
.hero-content {
    position: relative;
    z-index: 10;
}

/* Performance optimizations */
.falling-crinkle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .falling-crinkle {
        width: 40px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .falling-crinkle {
        width: 30px;
        height: 18px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .falling-crinkle {
        animation: none !important;
        opacity: 0.1 !important;
    }
}

/* Loading state */
.hero-container.loading .falling-crinkle {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.hero-container.loaded .falling-crinkle {
    opacity: 0.3;
}

/* Intersection Observer support for better performance */
.hero-container:not(.in-viewport) .falling-crinkle {
    animation-play-state: paused;
}

/* Optimize for low-end devices */
@media (max-width: 768px) and (max-device-width: 768px) {
    .falling-crinkle {
        animation-duration: 8s !important;
    }

    .falling-crinkle.float {
        animation: fall linear infinite !important;
    }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Admin Form Components */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #c2410c;
    margin-bottom: 0.5rem;
}

/* Admin Status Section */
.admin-status-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #fff7ed;
    border-radius: 0.5rem;
    border: 1px solid #fed7aa;
}

.admin-status-info {
    flex: 1;
    padding-right: 1.5rem;
}

.admin-status-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #431407;
    margin-bottom: 0.25rem;
}

.admin-status-description {
    font-size: 0.75rem;
    color: #ea580c;
}

.admin-status-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin Toggle Switch */
.admin-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.admin-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-toggle-slider {
    width: 3.5rem;
    height: 1.75rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.2s ease-in-out;
}

.admin-toggle-input:checked+.admin-toggle-slider {
    background-color: #ea580c;
}

.admin-toggle-slider::before {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.admin-toggle-input:checked+.admin-toggle-slider::before {
    transform: translateX(1.75rem);
    border-color: white;
}

.admin-toggle-labels {
    margin-left: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #c2410c;
}

.admin-toggle-active {
    display: none;
}

.admin-toggle-inactive {
    display: inline;
}

.admin-toggle-input:checked~.admin-toggle-labels .admin-toggle-active {
    display: inline;
}

.admin-toggle-input:checked~.admin-toggle-labels .admin-toggle-inactive {
    display: none;
}

/* Primary Image Toggle - Orange Theme */
.admin-primary-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background-color: #fff7ed;
    border-radius: 0.25rem;
    border: 1px solid #fed7aa;
    padding: 0.25rem 0.5rem;
    width: 5rem;
    /* matches h-20 w-20 (80px) image width */
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.admin-primary-toggle:hover {
    background-color: #ffedd5;
    border-color: #fb923c;
}

.admin-primary-toggle:has(input:checked) {
    background-color: #ea580c;
    border-color: #ea580c;
    color: white;
}

.admin-primary-radio {
    appearance: none;
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid #fed7aa;
    border-radius: 50%;
    margin-right: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    position: relative;
}

.admin-primary-radio:hover {
    border-color: #fb923c;
}

.admin-primary-radio:checked {
    background-color: #c2410c;
    border-color: #c2410c;
}

.admin-primary-toggle:has(input:checked) .admin-primary-radio {
    background-color: #fed7aa;
    border-color: #fed7aa;
}

.admin-primary-label {
    color: #c2410c;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}

.admin-primary-toggle:has(input:checked) .admin-primary-label {
    color: white;
}

/* File Input Styling */
.admin-file-input {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    color: #ea580c;
    border: 2px dashed #fed7aa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background-color: #fff7ed;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.admin-file-input:hover {
    border-color: #fb923c;
    background-color: #ffedd5;
}

.admin-file-input::file-selector-button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #ea580c;
    color: white;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.admin-file-input::file-selector-button:hover {
    background-color: #dc2626;
}

/* Image Manager Component */
.image-manager {
    width: 100%;
    max-width: 100%;
}

.image-manager-header {
    margin-bottom: 1rem;
}

.image-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid #fed7aa;
    background-color: #fff7ed;
}

.image-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-thumbnail.primary-selected {
    border: 3px solid #ea580c;
}

.remove-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.remove-image:hover {
    background-color: rgba(220, 38, 38, 0.95);
    transform: scale(1.1);
}

.remove-image svg {
    width: 1rem;
    height: 1rem;
}

.primary-toggle {
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.primary-toggle:hover {
    background-color: #ffedd5;
    border-color: #fb923c;
}

.primary-toggle.selected {
    background-color: #ea580c;
    color: white;
    border-color: #ea580c;
}

.primary-label {
    display: block;
}

.image-manager-upload {
    width: 100%;
}

.upload-dropzone {
    border: 2px dashed #fed7aa;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background-color: #fff7ed;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: #fb923c;
    background-color: #ffedd5;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    color: #ea580c;
}

.upload-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #c2410c;
    margin: 0;
}

.upload-subtext {
    font-size: 0.75rem;
    color: #ea580c;
    margin: 0;
}

/* User Management Tab Buttons */
.tab-button {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ea580c;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    cursor: pointer;
}

.tab-button:hover {
    color: #c2410c;
    border-color: #fed7aa;
}

.tab-button.active {
    border-color: #ea580c;
    color: #c2410c;
    background-color: #fff7ed;
}
