/* Frontend Styles for Appointment Booking Plugin */

.abp-booking-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Tabs */
.abp-booking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.abp-tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.abp-tab-button:hover {
    color: #2271b1;
}

.abp-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.abp-tab-content {
    display: none;
}

.abp-tab-content.active {
    display: block;
}

/* Services Grid */
.abp-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.abp-service-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.abp-service-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.abp-service-card h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #333;
}

.abp-service-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.abp-service-details {
    margin-bottom: 20px;
    flex: 1;
}

.abp-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.abp-detail-label {
    font-weight: 600;
    color: #555;
}

.abp-detail-value {
    color: #2271b1;
    font-weight: 600;
}

.abp-daily-tagline {
    color: #7c3aed;
    font-weight: 500;
    font-style: italic;
    font-size: 13px;
}

.abp-book-button {
    width: 100%;
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.abp-book-button:hover {
    background: #135e96;
}

/* Daily Passes Grid */
.abp-passes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.abp-pass-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.abp-pass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.abp-pass-card h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.abp-pass-description {
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.abp-pass-details {
    margin-bottom: 25px;
}

.abp-pass-price {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.abp-pass-card .abp-detail-item {
    border-bottom-color: rgba(255,255,255,0.2);
    padding: 8px 0;
}

.abp-pass-card .abp-detail-label {
    color: rgba(255,255,255,0.9);
}

.abp-pass-card .abp-detail-value {
    color: #fff;
}

.abp-purchase-pass-button {
    width: 100%;
    padding: 12px 24px;
    background: #fff;
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.abp-purchase-pass-button:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.02);
}

/* Modal */
.abp-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow-y: auto;
    overflow-x: hidden;
}

.abp-modal-content {
    background-color: #fff;
    margin: 5vh auto;
    padding: 48px 56px;
    border-radius: 12px;
    width: 90%;
    max-width: 720px;
    min-height: unset;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
    box-sizing: border-box;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.abp-booking-modal-close,
.abp-pass-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.abp-booking-modal-close:hover,
.abp-pass-modal-close:hover {
    color: #333;
}

.abp-modal h2 {
    margin: 0 0 25px 0;
    font-size: 28px;
    color: #333;
}

.abp-modal h3 {
    margin: 25px 0 15px 0;
    font-size: 18px;
    color: #555;
}

.abp-selected-service,
.abp-selected-pass {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 16px;
}

.abp-form-group {
    margin-bottom: 20px;
}

/* Two-column layout for the booking form */
#abp-booking-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    max-width: 960px;
    margin: 0 auto;
}

#abp-booking-form > h3,
#abp-booking-form > p,
#abp-booking-form .abp-form-group:first-child,
#abp-booking-form .abp-form-group:has(#booking-service-name),
#abp-booking-form .abp-form-group:has(#booking-service-pricing),
#abp-booking-form .abp-form-group:has(textarea),
#abp-booking-form .abp-pricing-info,
#abp-booking-form .abp-form-actions,
#abp-booking-success {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    #abp-booking-form {
        grid-template-columns: 1fr;
    }
}

.abp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.abp-form-group input,
.abp-form-group select,
.abp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.abp-form-group input:focus,
.abp-form-group select:focus,
.abp-form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.abp-pricing-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abp-price-label {
    font-size: 16px;
    font-weight: 600;
    color: #555;
}

.abp-price-value {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
}

.abp-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.abp-submit-button {
    flex: 1;
    padding: 14px 28px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.abp-submit-button:hover {
    background: #135e96;
}

.abp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.abp-cancel-button {
    padding: 14px 28px;
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.abp-cancel-button:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

/* Success Message */
#abp-booking-success,
#abp-pass-success {
    text-align: center;
    padding: 40px 20px;
}

.abp-success-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    font-size: 48px;
    font-weight: bold;
}

#abp-booking-success h3,
#abp-pass-success h3 {
    color: #333;
    margin-bottom: 15px;
}

#abp-booking-success p,
#abp-pass-success p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.abp-close-success {
    padding: 12px 32px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.abp-close-success:hover {
    background: #218838;
}

/* Custom Fields Styling */
.abp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.abp-radio-label,
.abp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.abp-radio-label input[type="radio"],
.abp-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.abp-booking-footer-message {
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: left;
    line-height: 1.6;
}

.abp-booking-footer-message p {
    margin: 0;
}

/* VIP Pricing Highlights */
.abp-vip-price {
    background: #fff9e6;
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.abp-vip-highlight {
    color: #f59e0b !important;
    font-weight: 700 !important;
}

.abp-daily-pass {
    background: #e7f3ff;
    padding: 8px;
    border-radius: 6px;
    border-left: 3px solid #2271b1;
}

.abp-pass-highlight {
    color: #2271b1 !important;
    font-weight: 700 !important;
}

/* Daily Pass Recommendation Box */
.abp-recommendation-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: start;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.abp-recommendation-icon {
    font-size: 32px;
    line-height: 1;
}

.abp-recommendation-content strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.abp-recommendation-content p {
    margin: 0;
    line-height: 1.5;
    opacity: 0.95;
}

.abp-recommended-duration {
    font-size: 13px;
    color: #2271b1;
    font-style: italic;
    margin-top: 5px;
}

/* Inline account section below booking form */
.abp-inline-account {
    margin-top: 40px;
    border-top: 2px solid #f0f0f0;
    padding-top: 30px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.abp-inline-account .abp-account-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .abp-booking-container {
        padding: 15px;
    }
    
    .abp-services-grid,
    .abp-passes-grid {
        grid-template-columns: 1fr;
    }
    
    .abp-modal-content {
        padding: 24px 20px;
        width: 95%;
        margin: 3vh auto;
    }
    
    /* Force booking form to single column on mobile */
    #abp-booking-form {
        grid-template-columns: 1fr !important;
        column-gap: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* All form groups full width */
    #abp-booking-form .abp-form-group,
    #abp-booking-form > * {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    /* Modal padding tighter on mobile */
    #abp-booking-modal > div {
        padding: 24px 18px 20px !important;
    }
    
    .abp-form-actions {
        flex-direction: column;
    }
    
    .abp-pricing-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Account section below booking */
    .abp-inline-account {
        margin-top: 20px;
    }

    /* Account/auth tables on mobile */
    .abp-appointments-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .abp-auth-wrapper {
        border-radius: 4px;
    }
}

/* User Menu in Header */
.abp-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.abp-booking-header h2 {
    margin: 0;
}

.abp-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.abp-welcome {
    color: #666;
    font-size: 14px;
    padding-right: 10px;
    border-right: 1px solid #ddd;
}

.abp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.abp-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.abp-btn-login {
    background: #2271b1;
    color: #fff !important;
}

.abp-btn-login:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.abp-btn-appointments {
    background: #2271b1;
    color: #fff !important;
}

.abp-btn-appointments:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.abp-btn-logout {
    background: #f0f0f0;
    color: #333 !important;
}

.abp-btn-logout:hover {
    background: #e0e0e0;
}

.abp-logged-in-notice {
    background: #e7f5ff;
    border-left: 4px solid #2271b1;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.abp-logged-in-notice a {
    color: #2271b1;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 600;
}

.abp-logged-in-notice a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .abp-booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .abp-user-menu {
        width: 100%;
    }
    
    .abp-welcome {
        border-right: none;
        padding-right: 0;
        margin-bottom: 10px;
    }
    
    .abp-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Login Widget Shortcode */
.abp-login-widget {
    display: inline-block;
}

.abp-login-button {
    text-align: center;
}

.abp-login-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.abp-user-welcome {
    color: #666;
    font-size: 14px;
    padding-right: 12px;
    border-right: 1px solid #ddd;
}

.abp-widget-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.abp-widget-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.abp-login-btn {
    background: #2271b1;
    color: #fff !important;
}

.abp-login-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.abp-appointments-btn {
    background: #2271b1;
    color: #fff !important;
}

.abp-appointments-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.abp-logout-btn {
    background: #f0f0f0;
    color: #333 !important;
}

.abp-logout-btn:hover {
    background: #e0e0e0;
}

/* Widget alignment options */
.abp-login-widget.abp-align-left {
    text-align: left;
}

.abp-login-widget.abp-align-right {
    text-align: right;
}

.abp-login-widget.abp-align-center {
    text-align: center;
}

@media (max-width: 768px) {
    .abp-login-menu {
        flex-direction: column;
        align-items: stretch;
    }
    
    .abp-user-welcome {
        border-right: none;
        padding-right: 0;
        text-align: center;
        padding-bottom: 8px;
    }
    
    .abp-widget-btn {
        justify-content: center;
        width: 100%;
    }
}

/* Account Notice for Non-Logged-In Users */
.abp-account-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.abp-notice-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.abp-notice-content {
    flex: 1;
}

.abp-notice-content strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.abp-notice-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .abp-account-notice {
        padding: 15px;
        gap: 12px;
    }
    
    .abp-notice-icon {
        font-size: 24px;
    }
    
    .abp-notice-content strong {
        font-size: 16px;
    }
    
    .abp-notice-content p {
        font-size: 13px;
    }
}

/* Field Hint */
.abp-field-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 12px;
    background: #f0f7ff;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
}

.hint-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.abp-field-hint strong {
    color: #667eea;
}

/* ── iOS auto-zoom fix: inputs must be ≥16px font-size ── */
@media (max-width: 768px) {
  .abp-form-group input,
  .abp-form-group select,
  .abp-form-group textarea,
  .abp-quick-book-form input,
  .abp-quick-book-form select,
  .abp-quick-book-form textarea,
  .abp-frontend-admin input,
  .abp-frontend-admin select,
  .abp-frontend-admin textarea,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Prevent zoom on booking modal inputs (all screen sizes) ── */
#abp-booking-modal input,
#abp-booking-modal select,
#abp-booking-modal textarea,
#abp-booking-modal .abp-modal-content {
  font-size: 16px !important;
  touch-action: manipulation;
}
#abp-booking-modal {
  touch-action: manipulation;
}
