@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

@theme {
    --default-font-family: payda;
    --breakpoint-tablet: 60;
    --breakpoint-laptop: 75rem;
    --breakpoint-desktop: 90rem;
    /* primary color */
    --color-primary: oklch(73.621% 0.17818 50.437);
    --color-primary-50: oklch(95.694% 0.02617 58.293);
    --color-primary-100: oklch(92.897% 0.04346 57.142);
    --color-primary-200: oklch(87.458% 0.07954 56.588);
    --color-primary-300: oklch(82.51% 0.11526 56.384);
    --color-primary-400: oklch(77.804% 0.14871 53.968);
    --color-primary-500: oklch(73.621% 0.17818 50.437);
    --color-primary-600: oklch(70.092% 0.2012 44.767);
    --color-primary-700: oklch(58.428% 0.16536 45.6);
    --color-primary-800: oklch(46.002% 0.12831 46.486);
    --color-primary-900: oklch(32.841% 0.08751 49.451);
    --color-primary-950: oklch(25.684% 0.06589 52.179);

    /* secondary color */
    --color-secondary: oklch(30.235% 0.05113 275.21);
    --color-secondary-50: oklch(60.319% 0.08313 275.57);
    --color-secondary-100: oklch(56.464% 0.0923 275);
    --color-secondary-200: oklch(49.562% 0.09363 274.35);
    --color-secondary-300: oklch(43.266% 0.08152 275.43);
    --color-secondary-400: oklch(36.823% 0.06607 274.77);
    --color-secondary-500: oklch(30.235% 0.05113 275.21);
    --color-secondary-600: oklch(20.437% 0.02838 274.35);
    --color-secondary-700: oklch(0% 0 none);
    --color-secondary-800: oklch(0% 0 none);
    --color-secondary-900: oklch(0% 0 none);
    --color-secondary-950: oklch(0% 0 none);

    /* tertiary color */
    --color-tertiary: oklch(65.347% 0.23281 28.509);
    --color-tertiary-50: oklch(100% 0 none);
    --color-tertiary-100: oklch(99.336% 0.00319 17.211);
    --color-tertiary-200: oklch(90.813% 0.04734 21.274);
    --color-tertiary-300: oklch(82.761% 0.09584 22.471);
    --color-tertiary-400: oklch(75.673% 0.14543 24.1);
    --color-tertiary-500: oklch(69.625% 0.19409 26.276);
    --color-tertiary-600: oklch(65.347% 0.23281 28.509);
    --color-tertiary-700: oklch(61.517% 0.24944 29.631);
    --color-tertiary-800: oklch(50.769% 0.20506 29.761);
    --color-tertiary-900: oklch(39.458% 0.15771 30.117);
    --color-tertiary-950: oklch(33.452% 0.13309 30.274);

    /*
    /* user panel variable
     */
    --color-primary: #FF8229FF;
    --color-primary-light: #FF8229FF;
    --color-primary-dark: #b76122;

    --color-secondary: #272C48FF;
    --color-secondary-light: #272C48FF;
    --color-secondary-dark: #3d4487;

    --color-dark: #1E293B;
    --color-dark-light: #1E293B;
    --color-dark-dark: #F8FAFC;

    --color-light: #F8FAFC;
    --color-light-light: #F8FAFC;
    --color-light-dark: #1E293B;

    --color-success: #10B981;
    --color-success-light: #10B981;
    --color-success-dark: #34D399;

    --color-danger: #EF4444;
    --color-danger-light: #EF4444;
    --color-danger-dark: #F87171;

    --color-warning: #F59E0B;
    --color-warning-light: #F59E0B;
    --color-warning-dark: #FBBF24;

    --color-background-light: #F8FAFC;
    --color-background-dark: #0F172A;

    --color-card-light: #FFFFFF;
    --color-card-dark: #1E293B;

    --color-text-primary-light: #1E293B;
    --color-text-primary-dark: #F8FAFC;

    --color-text-secondary-light: #64748B;
    --color-text-secondary-dark: #94A3B8;

    --shadow-soft: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
    --shadow-soft-dark: 0 4px 24px 0 rgba(0, 0, 0, 0.2);
    --shadow-hard: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

@layer utilities {
    .container {
        @apply mx-auto px-3;
    }
    .animate-float-slow {
        animation: float 6s ease-in-out infinite;
    }
    .animate-float-fast {
        animation: float 3s ease-in-out infinite 1s;
    }
}

@layer base {
    @font-face {
        font-family: "payda";
        src: url("../fonts/payda/PeydaWebFaNum-Medium.woff2") format("woff2");
        font-weight: normal;
    }

    @font-face {
        font-family: "payda";
        src: url("../fonts/payda/PeydaWebFaNum-Bold.woff2") format('woff2');
        font-weight: 700;
    }

    @font-face {
        font-family: "payda";
        src: url("../fonts/payda/PeydaWebFaNum-Black.woff2") format('woff2');
        font-weight: 900;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        @apply bg-[#f7f7f7]
    }

    * {
        @apply outline-[none]
    }

    a, button, input[type=submit] {
        @apply cursor-pointer
    }

    [onclick] {
        @apply cursor-pointer
    }

    .bg-ul-f7 {
        @apply bg-[#f7f7f7]
    }

    input, textarea {
        @apply transition
    }

    .dark textarea {
        @apply placeholder-gray-400
    }

    button {
        @apply transition
    }

    input:focus, textarea:focus {
        outline: none;
        box-shadow: none;
        border-color: var(--color-primary) !important;
        background-clip: padding-box;
    }

    .dir-rtl {
        direction: rtl;
    }

    .dir-ltr {
        direction: ltr;
    }

    .mega-menu-li.bg-gray-100 {
        @apply text-zinc-900
    }

    /**
    article content
     */
    .article-content {
        line-height: 1.8;
        color: #333;
        font-size: 16px;
    }

    .article-content p {
        margin-bottom: 1.5rem;
        line-height: 1.8;
    }

    .article-content h2,
    .article-content h3,
    .article-content h4 {
        margin: 2rem 0 1rem;
        font-weight: bold;
    }

    .article-content h2 {
        font-size: 1.8rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 0.5rem;
    }

    .article-content h3 {
        font-size: 1.5rem;
    }

    .article-content h4 {
        font-size: 1.3rem;
    }

    .article-content a {
        color: #3b82f6;
        text-decoration: underline;
    }

    .article-content a:hover {
        color: #2563eb;
    }

    .article-content ul,
    .article-content ol {
        margin-bottom: 1.5rem;
        padding-left: 2rem;
    }

    .article-content li {
        margin-bottom: 0.5rem;
        line-height: 1.7;
    }

    .article-content img {
        max-width: 100%;
        height: auto;
        margin: 1.5rem auto;
        border-radius: 8px;
        display: block;
    }

    .article-content blockquote {
        border-right: 4px solid #3b82f6;
        background-color: #f8fafc;
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
        font-style: italic;
        color: #555;
    }

    .article-content code {
        font-family: monospace;
        background-color: #f3f4f6;
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        font-size: 0.9em;
    }

    .article-content pre {
        background-color: #f8fafc;
        padding: 1rem;
        border-radius: 8px;
        overflow-x: auto;
        margin: 1.5rem 0;
        border: 1px solid #e5e7eb;
    }

    .article-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5rem 0;
    }

    .article-content th,
    .article-content td {
        padding: 0.75rem;
        border: 1px solid #e5e7eb;
        text-align: right;
    }

    .article-content th {
        background-color: #f9fafb;
        font-weight: bold;
    }
}

@layer components {
    /* swiper */
    .swiper-wrapper {
        @apply w-full !h-max !pb-[64px] !ease-linear relative
    }

    .swiper-pagination-bullet {
        @apply bg-[#4f46e5]
    }

    .swiper-slide-thumb-active{
        @apply border border-primary rounded-lg p-0
    }

    .swiper-slide-thumb-active img{
        @apply !border-0
    }

    .slider-pagination-bg {
        @apply bg-[url(../images/slider/Vector1.svg)]
    }

    .bg-primary-grad {
        @apply bg-gradient-to-r from-tertiary-600 to-primary-600 transition duration-300
    }

    .bg-primary-grad:hover {
        @apply bg-gradient-to-r from-primary-500 to-tertiary-500
    }

    .bg-primary-grad.no-hover:hover {
        @apply bg-gradient-to-r from-tertiary-600 to-primary-600
    }

    .product-box-item .image img {
        display: block;
        margin: auto;
        width: 170px;
        height: 170px;
        object-fit: contain;
        border-radius: 10px;
    }

    .product-box-item .two-image {
        z-index: -1;
        position: absolute;
        top: 30px;
        right: 0;
        left: 0;
        visibility: hidden;
        opacity: 0;
        transition: transform 1.5s, visibility .5s, opacity .5s;
        -webkit-transition: transform 1.5s, visibility .5s, opacity .5s;
        -moz-transition: transform 1.5s, visibility .5s, opacity .5s;
        -ms-transition: transform 1.5s, visibility .5s, opacity .5s;
        -o-transition: transform 1.5s, visibility .5s, opacity .5s;
    }

    .product-box-item:hover .one-image {
        opacity: 0;
        visibility: hidden;
    }

    .product-box-item:hover .two-image {
        visibility: visible;
        opacity: 1;
        display: block;
        transform: scale(1.15);
    }

    .section-heading {
        position: relative;
    }

    .section-heading::before {
        content: "";
        width: 40px;
        height: 60px;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        background-image: radial-gradient(#6f6c6c 1px, transparent 2px);
        -webkit-background-size: 20px 20px;
        background-size: 10px 10px;
        border-radius: 0;
        z-index: -1;
    }

    .btn {
        @apply focus:ring-4 font-medium rounded-lg text-sm px-3 py-2 me-2 mb-2  focus:outline-none transition
    }

    /**
    price range
     */
    .slider-container {
        position: relative;
        height: 40px;
        margin: 20px 0;
    }

    .slider-track {
        position: absolute;
        width: 100%;
        height: 4px;
        background: #ddd;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 2px;
    }

    .slider-range {
        position: absolute;
        height: 4px;
        bottom: 18px;
        background: #3b82f6;
        z-index: 1;
    }

    .slider-thumb {
        position: absolute;
        width: 20px;
        height: 20px;
        background: white;
        border: 2px solid #3b82f6;
        border-radius: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        cursor: pointer;
        z-index: 2;
    }

    .dark .time-slot {
        background: var(--color-zinc-900) !important;
    }

    .dark .time-slot:hover {
        background: var(--color-zinc-900) !important;
    }

    .dark .time-slot.bg-blue-50 {
        background: var(--color-zinc-700) !important;
    }

    .dark .day-option:hover {
        color: #333;
    }

    .success-animation {
        animation: bounce 0.9s ease-in-out infinite alternate;
    }
    @keyframes bounce {
        0% { transform: translateY(0); }
        100% { transform: translateY(-5px); }
    }

    .shake-animation {
        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    }
    @keyframes shake {
        10%, 90% { transform: translateX(-1px); }
        20%, 80% { transform: translateX(2px); }
        30%, 50%, 70% { transform: translateX(-3px); }
        40%, 60% { transform: translateX(3px); }
    }

    /*  gift cart  */
    .gift-card {
        background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
        border-radius: 12px;
        position: relative;
        overflow: hidden;
    }

    .gift-card::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
        transform: rotate(30deg);
    }

    .gift-card-dark {
        background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    }

    .gift-card-code {
        letter-spacing: 3px;
        font-family: monospace;
    }

    .tab-content {
        transition: all 0.3s ease;
    }

    .modal-enter {
        opacity: 0;
        transform: scale(0.9);
    }

    .modal-enter-active {
        opacity: 1;
        transform: scale(1);
        transition: opacity 300ms, transform 300ms;
    }

    .modal-exit {
        opacity: 1;
    }

    .modal-exit-active {
        opacity: 0;
        transform: scale(0.9);
        transition: opacity 300ms, transform 300ms;
    }

    /* Custom style for switches */
    .toggle-switch {
        position: relative;
        display: inline-block;
        width: 3.5rem;
        height: 2rem;
    }

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #e2e8f0;
        transition: .4s;
        border-radius: 2rem;
    }

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 1.5rem;
        width: 1.5rem;
        left: 0.25rem;
        bottom: 0.25rem;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

    input:checked + .toggle-slider {
        background-color: var(--color-primary);
    }

    input:checked + .toggle-slider:before {
        transform: translateX(1.5rem);
    }

    .dark .toggle-slider {
        background-color: #4b5563;
    }

    .dark input:checked + .toggle-slider {
        background-color: var(--color-primary-500);
    }

    /* Active tab style */
    .tab-active {
        background-color: rgba(59, 130, 246, 0.1);
        color: #3B82F6;
    }

    .dark .tab-active {
        background-color: rgba(59, 130, 246, 0.2);
        color: #60A5FA;
    }

    /**
    auth
     */
    .auth-bg {
        background-image: url('../images/auth/background.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .input-icon {
        left: 12px;
        right: auto;
    }

    .password-toggle {
        left: 12px;
        right: auto;
        cursor: pointer;
    }

    @media (max-width: 1024px) {
        .auth-bg {
            background-image: none;
        }
    }

    /*Registration process style*/
    .step {
        display: none;
    }

    .step.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .step-indicator {
        display: flex;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        margin: 0 0.5rem;
        position: relative;
    }

    .step-circle.active {
        background-color: #3B82F6;
        color: white;
    }

    .step-circle.inactive {
        background-color: #E5E7EB;
        color: #6B7280;
    }

    .step-line {
        height: 2px;
        background-color: #E5E7EB;
        flex-grow: 1;
        margin: auto 0;
        position: relative;
    }

    .step-line.active {
        background-color: #3B82F6;
    }

    /*Password strength indicator style*/
    .password-strength {
        height: 4px;
        background-color: #E5E7EB;
        margin-top: 8px;
        border-radius: 2px;
        overflow: hidden;
    }

    .password-strength-bar {
        height: 100%;
        width: 0;
        transition: width 0.3s ease, background-color 0.3s ease;
    }

    .password-strength-weak {
        background-color: #EF4444;
        width: 33%;
    }

    .password-strength-medium {
        background-color: #F59E0B;
        width: 66%;
    }

    .password-strength-strong {
        background-color: #10B981;
        width: 100%;
    }

    .password-requirements {
        margin-top: 8px;
        font-size: 0.8rem;
        color: #6B7280;
    }

    .requirement {
        display: flex;
        align-items: center;
        margin-bottom: 4px;
    }

    .requirement-icon {
        margin-left: 4px;
    }

    .requirement.valid {
        color: #10B981;
    }

    .requirement.invalid {
        color: #EF4444;
    }

    /**
    login
     */
    .auth-bg {
        background-image: url('../images/panel/photo-1581291518633-83b4ebd1d83e.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .input-icon {
        left: 12px;
        right: auto;
    }

    .password-toggle {
        left: 12px;
        right: auto;
        cursor: pointer;
    }

    @media (max-width: 1024px) {
        .auth-bg {
            background-image: none;
        }
    }

    /* Animations */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .fade-in {
        animation: fadeIn 0.5s ease;
    }

    /*Error mode style*/
    .input-error {
        border-color: #EF4444;
    }

    .error-message {
        color: #EF4444;
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }

    /*Time counter*/
    .tab-button {
        transition: all 0.3s ease;
    }

    .tab-button.active {
        background-color: #3B82F6;
        color: white;
    }

    .tab-button:not(.active):hover {
        background-color: #EFF6FF;
    }

    .dark .tab-button:not(.active):hover {
        background-color: #1E3A8A;
    }

    /*Time counter*/
    .countdown {
        font-family: monospace;
    }

    /**
    accordion
     */
    .accordion-content {
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    }

    .gradient-text {
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }

    .pattern-dots {
        background-image: radial-gradient(currentColor 1px, transparent 1px);
        background-size: 10px 10px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@media print {
    .no-print, .sidebar, header {
        display: none !important;
    }
    body {
        background: white !important;
        font-size: 12px;
    }
    .invoice-box {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
