/* saigonapart.com - Custom styles */

/* Safe area for iOS bottom bar */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Hide scrollbar in horizontal scroll containers */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Gallery smooth transitions */
.gallery-slide {
    transition: opacity 0.2s ease-in-out;
}

/* Form elements consistent styling (scoped to main content, not header) */
main input[type="text"],
main input[type="email"],
main input[type="number"],
main input[type="tel"],
main input[type="url"],
main select,
main textarea {
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #111827;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

main select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

main input:focus,
main select:focus,
main textarea:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.15);
}

main input::placeholder,
main textarea::placeholder {
    color: #9ca3af;
}

/* Language switcher (compact, header-only) */
select.lang-switch {
    display: inline-block !important;
    width: auto !important;
    height: 1.75rem !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    padding: 0.25rem 1.5rem 0.25rem 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    background-color: #f9fafb !important;
    color: #374151 !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right 0.25rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1em 1em !important;
    box-shadow: none !important;
    margin: 0;
}
select.lang-switch:focus {
    outline: none !important;
    border-color: #9ca3af !important;
    box-shadow: none !important;
}

/* Checkbox & radio styling */
input[type="checkbox"],
input[type="radio"] {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    background-origin: border-box;
    user-select: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #dc2626;
    border-color: #dc2626;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* File upload zone */
.file-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.file-upload-zone:hover {
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* Required field asterisk */
.required::after {
    content: " *";
    color: #dc2626;
}

/* Property card hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Smooth page transitions */
main {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* Print styles */
@media print {
    header, footer, nav, .gallery-prev, .gallery-next, [data-gallery-counter] {
        display: none !important;
    }
}
