/* Enhanced Component Styles */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 20, 120, 0.3);
}

.btn-secondary {
    background: var(--text-primary);
    color: white;
}

.btn-secondary:hover {
    background: #000000;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--text-primary);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 5px 0;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: #10B981;
    color: white;
}

/* Input */
.input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

.input::placeholder {
    color: var(--text-light);
}

.input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-light);
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.modal-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    gap: 12px;
    transition: all 0.2s ease;
}

.phone-input-wrapper:focus-within {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

.country-code {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.country-code span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.phone-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
}

.form-help-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.link-primary {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 5px;
}

/* Enhanced Shimmer Loader */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        to right,
        #f6f7f8 0%,
        #edeef1 20%,
        #f6f7f8 40%,
        #f6f7f8 100%
    );
    background-size: 1000px 100%;
}

/* Skeleton Loader Components */
.skeleton {
    background: #f0f0f0;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1/1;
}

/* Property Card Skeleton */
.property-card-skeleton {
    width: 100%;
}

.property-card-skeleton .skeleton-image {
    aspect-ratio: 1/1;
    border-radius: 12px;
    margin-bottom: 10px;
}

.property-card-skeleton .skeleton-text {
    width: 100%;
    margin-bottom: 8px;
}

.property-card-skeleton .skeleton-text-short {
    width: 60%;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1;
    border: 1px solid var(--border-light);
    padding: 8px;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    color: var(--text-primary);
    border-radius: 8px;
    transition: background 0.15s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
}

/* Alert */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

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

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-item:hover:not(.active):not(:disabled) {
    background: var(--bg-light);
}

.pagination-item.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

.pagination-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-light);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block;
}

.overflow-hidden {
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.pointer-events-none {
    pointer-events: none;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
        max-width: 100%;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }
}

.space-y-2>:not([hidden])~:not([hidden]) {
    margin-top: calc(.5rem * calc(1 - 0));
    margin-bottom: calc(.5rem * 0);
}

.w-20{
    width: 20px;
}

.h-20 {
    height: 20px;
}

.text-gray-300 {
    color: rgb(209 213 219);
}

.w-full {
    width: 100%;
}
.h-full {
    height: 100%;
}

.inset-0 {
    inset: 0;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.flex{
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between{
    justify-content: space-between;
}

.text-grey {
    color: rgb(102 104 112);
}

.font-medium {
    font-weight: 500;
}
.text-xs {
    font-size: .75rem;
    line-height: 1rem;
}

.text-yellow-400 {
    color: rgb(250 204 21);
}