/* Custom styles for the digital visiting card */

/* Theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Light mode colors */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --accent-color: #3b82f6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode colors */
:root[class="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --accent-color: #60a5fa;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Apply theme colors */
body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
}

.bg-white {
    background-color: var(--bg-primary) !important;
}

.text-gray-800 {
    color: var(--text-primary) !important;
}

.text-gray-600, .text-gray-500, .text-gray-400 {
    color: var(--text-secondary) !important;
}

.border {
    border-color: var(--border-color) !important;
}

/* Card and container styles */
.max-w-md {
    background-color: var(--bg-primary);
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
}

/* Theme toggle button styles */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--bg-primary);
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 50;
    border: 1px solid var(--border-color);
    outline: none;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px -2px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

:root[class="dark"] .theme-toggle {
    background: var(--bg-secondary);
}

.theme-toggle i {
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
}

.theme-toggle .sun-icon {
    color: #fbbf24;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    color: #60a5fa;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

:root[class="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

:root[class="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Header styles */
.fixed.top-0 {
    background: linear-gradient(to right, 
        rgba(31, 41, 55, 0.8), 
        rgba(17, 24, 39, 0.8)
    );
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

html.dark .fixed.top-0 {
    background: linear-gradient(to right, 
        rgba(17, 24, 39, 0.8), 
        rgba(31, 41, 55, 0.8)
    );
}

.fixed.top-0 h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fixed.top-0 i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Custom animation for header icon */
@keyframes card-flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

.fixed.top-0 i {
    animation: card-flip 3s infinite linear;
    transform-style: preserve-3d;
}

/* Banner styles */
.h-40 {
    height: 10rem;
}

/* Profile image styles */
.w-28 {
    width: 7rem;
}

.h-28 {
    height: 7rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* Profile image border and shadow */
.border-4 {
    border-width: 4px;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Verification badge styles */
.absolute.bottom-1.-right-3 {
    z-index: 20;
}

.absolute.bottom-1.-right-3 svg {
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1));
    transition: transform 0.2s ease;
}

.absolute.bottom-1.-right-3:hover svg {
    transform: scale(1.1);
}

/* Profile image hover effect */
.transform {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.transition-transform {
    transition-property: transform;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Verification badge */
.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Custom font classes */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .fixed.top-0 {
        padding: 0.75rem;
    }

    .fixed.top-0 h1 {
        font-size: 1rem;
    }

    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        z-index: 50;
    }

    .max-w-md {
        max-width: 100%;
        margin: 0 auto;
        margin-top: 4rem;
    }

    .max-w-md  {
        max-width: 100%;
        margin: 0 auto;
        /* padding: 0 1rem; */
    }

    .rounded-lg {
        border-radius: 0.75rem;
    }
    
    /* Maintain profile and buttons layout for mobile */
    .flex.items-start.px-6.-mt-12 {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0 1rem;
    }
    
    .flex-1.flex.flex-wrap.justify-end.gap-3.mt-14 {
        justify-content: flex-end;
        margin-top: 3.5rem;
        gap: 0.5rem;
    }
    
    .relative.mr-4 {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    /* Adjust button layout for mobile */
    .flex.flex-wrap.justify-end.gap-3 button {
        width: auto;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Maintain banner height */
    .h-40 {
        height: 10rem;
    }

    /* Maintain profile image size */
    .w-28, .h-28 {
        width: 7rem;
        height: 7rem;
    }

    /* Maintain verification badge position */
    .absolute.bottom-1.-right-3 {
        bottom: 0.25rem;
        right: -0.75rem;
    }

    .absolute.bottom-1.-right-3 svg {
        height: 1.5rem;
        width: 1.5rem;
    }

    /* Quick Actions Grid for mobile */
    .grid.grid-cols-1.gap-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }

    /* Adjust card padding for mobile */
    .group.bg-white.rounded-xl.p-4 {
        padding: 1rem;
    }

    /* Maintain icon sizes in cards */
    .text-xl {
        font-size: 1.25rem;
    }

    /* Adjust spacing in cards */
    .flex.items-center .mr-4 {
        margin-right: 1rem;
    }

    /* Maintain text sizes */
    .text-base {
        font-size: 1rem;
    }

    .text-sm {
        font-size: 0.875rem;
    }

    /* Adjust tab navigation */
    .overflow-x-auto {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .tab-item {
        white-space: nowrap;
        padding: 0.5rem 0;
    }

    .small-screen-banner {
        height: 10rem;
        width: 100%;
    }

    .small-screen-banner img {
        height: 10rem;
        width: 100%;
    }

    /* Theme Toggle Button Styles */
    .theme-toggle {
        position: fixed;
        top: auto;
        bottom: 5rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.75rem;
        background: linear-gradient(145deg, #e6e6e6, #ffffff);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    html.dark .theme-toggle {
        background: linear-gradient(145deg, #2d2d2d, #363636);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }

    .theme-toggle i {
        font-size: 1rem;
    }
}

/* Add styles for extra small screens */
@media (max-width: 360px) {
    .flex.items-start.px-6.-mt-12 {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .flex-1.flex.flex-wrap.justify-end.gap-3.mt-14 {
        justify-content: center;
        margin-top: 1rem;
        width: 100%;
    }

    .relative.mr-4 {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .flex.flex-wrap.justify-end.gap-3 button {
        width: 100%;
    }

    .theme-toggle {
        bottom: 4.5rem;
        right: 0.75rem;
        width: 2.25rem;
        height: 2.25rem;
    }
}

/* Maintain card hover effects */
.group:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
}

/* Smooth transitions for all interactive elements */
.group, button, .tab-item {
    transition: all 0.3s ease;
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
}

/* Tab hover effects */
.nav-tab {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-tab:hover::after {
    width: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal styles */
#contactModal {
    transition: opacity 0.3s ease;
}

#contactModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#contactModal:not(.hidden) {
    opacity: 1;
}

#contactModal .bg-white {
    background-color: var(--bg-primary);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#contactModal:not(.hidden) .bg-white {
    transform: scale(1);
}

/* Tab content transition */
.tab-content {
    transition: opacity 0.3s ease;
}

.tab-content.hidden {
    display: none;
    opacity: 0;
}

.tab-content:not(.hidden) {
    opacity: 1;
}

/* Profile image effects */
.rounded-lg {
    transition: transform 0.3s ease;
}

/* Verification badge pulse effect */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.absolute.-bottom-1\.5.-right-1\.5.bg-blue-500 {
    animation: pulse 2s infinite;
    z-index: 10;
}

/* Improve accessibility */
button:focus, a:focus, .nav-tab:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth page transitions */
body {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }
    
    .max-w-md {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
    }
    
    #contactModal {
        display: none !important;
    }
}

/* Tab navigation */
.tab-item {
    color: var(--text-secondary);
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent-color);
    border-color: var(--accent-color);
} 