/* Tailwind Custom Styles for Shine Washer & Dry Cleaner
   This file contains customized Tailwind utilities that can be used across all pages
*/

@layer utilities {
    /* Transitions & Animations */
    .transition-smooth {
        transition: all 0.3s ease-in-out;
    }

    .floating {
        animation: floating 3s ease-in-out infinite;
    }

    @keyframes floating {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }

    .hover-lift {
        transition: transform 0.3s ease;
    }

    .hover-lift:hover {
        transform: translateY(-5px);
    }

    /* Mobile Menu Transitions */
    .mobile-menu-transition {
        transition: opacity 250ms ease-in-out, transform 250ms ease-in-out, max-height 250ms ease-in-out;
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        overflow: hidden;
    }

    .mobile-menu-open {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px; /* Adjust based on your menu's maximum height */
    }

    .mobile-menu-closed {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    /* Menu Icon Animation */
    .menu-icon-rotate {
        animation: menuIconRotate 250ms ease-in-out;
    }

    @keyframes menuIconRotate {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(90deg); }
    }

    @media (min-width: 768px) {
        /* Hide mobile menu on desktop regardless of state */
        .md\:hidden.mobile-menu-open,
        .md\:hidden.mobile-menu-closed {
            display: none;
        }
    }

    /* Layout & Containers */
    .container-padding {
        @apply px-4 sm:px-6 lg:px-8 xl:px-12;
    }

    /* Icon Styles */
    .svg-icon {
        @apply h-7 w-7 sm:h-8 sm:w-8 text-primary;
    }

    .svg-icon-lg {
        @apply h-8 w-8 sm:h-10 sm:w-10 text-primary;
    }

    /* Section Titles */
    .section-title {
        @apply text-2xl sm:text-3xl md:text-4xl font-bold relative pb-3;
    }

    .section-title::after {
        content: '';
        @apply absolute bottom-0 left-1/2 transform -translate-x-1/2 w-16 h-1 bg-primary rounded-full;
    }

    .section-title-left::after {
        @apply left-0 transform-none;
    }

    /* Form Elements */
    .form-input {
        @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary;
    }

    .form-label {
        @apply block text-gray-700 mb-2 font-medium;
    }

    .form-select {
        @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary;
    }

    .required-field::after {
        content: '*';
        @apply text-red-500 ml-1;
    }

    .custom-focus:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
    }
}

/* SVG icon-specific styles */
.icon, .icon-ironing, .icon-delivery, .icon-wash-fold, .icon-dry-cleaning {
    stroke: #3B82F6; /* primary color */
}

object[data$=".svg"] {
    color: #3B82F6; /* primary color */
}