/**
 * Mobile Touch Target Standards
 * Ensures all interactive elements meet 44x44px minimum
 */

/* Base button styles */
button,
.button,
.btn,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"] {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.2;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Small buttons need extra padding */
.btn-sm,
.button-small {
    padding: 8px 12px;
    position: relative;
}

.btn-sm::before,
.button-small::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
    z-index: -1;
}

/* Icon buttons */
.btn-icon,
.icon-button,
[data-favorite-id] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
}

/* Checkbox and radio targets */
input[type="checkbox"],
input[type="radio"] {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 12px; /* Creates 44x44 touch target */
}

/* Links that act as buttons */
a.button,
a.btn,
.nav-link,
.menu-item a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 16px;
    text-decoration: none;
}

/* Card click targets */
.clickable-card,
.saint-card,
.journey-card {
    position: relative;
    cursor: pointer;
}

.clickable-card::before,
.saint-card::before,
.journey-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Close buttons */
.close,
.btn-close,
.modal-close,
[aria-label="Close"] {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown items */
.dropdown-item,
.select-item,
.autocomplete-item {
    min-height: 44px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

/* Tab navigation */
.nav-tabs .nav-link,
.tab-button {
    min-height: 44px;
    padding: 12px 20px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Increase spacing between clickable elements */
    .button-group > *,
    .btn-group > * {
        margin: 4px;
    }
    
    /* List items need proper spacing */
    .list-group-item,
    .menu-item {
        padding: 16px;
        margin-bottom: 1px;
    }
    
    /* Modal buttons */
    .modal-footer .btn {
        flex: 1;
        margin: 4px;
    }
    
    /* Form spacing */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* Navigation items */
    .navbar-nav .nav-link {
        padding: 16px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
}

/* Accessibility focus styles */
*:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Touch feedback */
button:active,
.btn:active,
[role="button"]:active {
    transform: scale(0.98);
    opacity: 0.9;
}