/**
 * PenhTech Booking Widget Styles
 * Responsive tabbed interface with 640px x 450px base dimensions
 */

/* Main widget container */
.penhtech-booking-widget {
    width: 100%;
    min-height: 500px;
    border: 3px solid #be9e56;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* display: flex; */
    /* flex-direction: column; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Tab navigation container */
.penhtech-booking-widget .tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #be9e56;
    min-height: 50px;
    flex-shrink: 0;
}

/* Individual tab buttons */
.penhtech-booking-widget .tab-button {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #be9e56 !important;
    padding: 12px 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    border-right: 1px solid #dee2e6;
    position: relative;
}

.penhtech-booking-widget .tab-button:last-child {
    border-right: none;
}

.penhtech-booking-widget .tab-button:hover {
    background: #000;
    color: #be9e56;
}

.penhtech-booking-widget .tab-button:focus {
    outline: 2px solid #be9e56;
    outline-offset: -2px;
    z-index: 1;
}

/* Active tab button */
.penhtech-booking-widget .tab-button.active,
.penhtech-booking-widget .tab-button.active:hover {
    background: #be9e56;
    color: #000 !important;
    font-weight: 600;
}

.penhtech-booking-widget .tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #be9e56;
}

/* Tab content container */
.penhtech-booking-widget .tab-content-container {
    /* flex: 1; */
    /* position: relative; */
    overflow: hidden;
}

/* Individual tab content */
.penhtech-booking-widget .tab-content {
    /* position: absolute; */
    /* top: 0;
    left: 0;
    right: 0;
    bottom: 0; */
    padding: 20px;
    /* opacity: 0;
    visibility: hidden; */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    background: #ffffff;
}

.penhtech-booking-widget .tab-content.active {
    opacity: 1;
    visibility: visible;
}

/* Tab content styling */
.penhtech-booking-widget .penhtech-tab-header {
    margin-bottom: 1.75em;
}

/* Placeholder content styling */
/* .penhtech-booking-widget .tab-main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #6c757d;
    font-style: italic;
} */

.penhtech-booking-widget .tab-main p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */

/* Tablet styles (768px and below) */
@media (max-width: 768px) {
    .penhtech-booking-widget {
        max-width: 100%;
        height: auto;
        min-height: 400px;
        margin: 0;
        border-radius: 6px;
    }
    
    .penhtech-booking-widget .tab-navigation {
        min-height: 45px;
    }
    
    .penhtech-booking-widget .tab-content {
        padding: 15px;
    }
}

/* Mobile styles (480px and below) */
@media (max-width: 480px) {
    .penhtech-booking-widget {
        margin: 0;
        min-height: 350px;
        border-radius: 4px;
    }
    
    .penhtech-booking-widget .tab-navigation {
        /* flex-wrap: wrap; */
        min-height: auto;
    }
    
    .penhtech-booking-widget .tab-navigation .navitem {
        display: flex;
    }
    
    .penhtech-booking-widget .tab-button {
        /* flex: 1 1 50%; */
        border-right: 1px solid #dee2e6;
        border-bottom: 1px solid #dee2e6;
    }
    
    .penhtech-booking-widget .tab-button:nth-child(2n) {
        border-right: none;
    }
    
    .penhtech-booking-widget .tab-button:nth-last-child(-n+2) {
        border-bottom: none;
    }
    
    .penhtech-booking-widget .tab-content {
        padding: 12px;
    }
    
    .penhtech-booking-widget .tab-main p {
        font-size: 14px;
    }
}

/* Form labels */
.penhtech-booking-widget .wpcf7 label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #0F0F0F;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Form input fields */
.penhtech-booking-widget .wpcf7-form-control {
    /* width: 100%; */
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.penhtech-booking-widget .wpcf7-form-control:focus {
    outline: none;
    border-color: #be9e56;
    box-shadow: 0 0 0 3px rgba(190, 158, 86, 0.1);
}

/* Select dropdowns */
.penhtech-booking-widget .wpcf7-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.penhtech-booking-widget .wpcf7-select:hover {
    border-color: #be9e56;
}

/* Date inputs */
.penhtech-booking-widget .wpcf7-date {
    position: relative;
}

/* Text inputs */
.penhtech-booking-widget .wpcf7-text,
.penhtech-booking-widget .wpcf7-email,
.penhtech-booking-widget .wpcf7-tel {
    font-size: 16px;
}

/* Conditional fields styling */
.penhtech-booking-widget .uacf7_conditional {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.penhtech-booking-widget .uacf7_conditional.uacf7-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.penhtech-booking-widget .uacf7_conditional:not(.uacf7-hidden) {
    opacity: 1;
    max-height: 200px;
}

/* Disabled fields */
.penhtech-booking-widget .disabled-element,
.penhtech-booking-widget .wpcf7-form-control:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

/* Form validation */
.penhtech-booking-widget .wpcf7-not-valid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.penhtech-booking-widget .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Form buttons */
.penhtech-booking-widget .book-button-container {
    margin-bottom: 20px;
}

.uacf7-step.step-content button.uacf7-prev, 
.uacf7-step.step-content button.uacf7-next {
    margin-top: 0 !important;
}

.penhtech-booking-widget .uacf7-buttons {
    margin: 20px auto;
    width: 140px;
}

.penhtech-booking-widget div[step-id="1"] .uacf7-buttons {
    margin: 20px auto 0;
}

.penhtech-booking-widget div[step-id="2"] .uacf7-buttons {	
    margin-top: 20px;    
    float: left;
}

.penhtech-booking-widget input[type="submit"],
.penhtech-booking-widget input[type="submit"] {
    margin-top: 20px;    
    float: right;
    font-family: Poppins, sans-serif;
    font-weight: 500;
    padding: 12px 24px;
    background: #be9e56;
}

.penhtech-booking-widget input[type="submit"]:hover {
    background: #000 !important;
}

.penhtech-booking-widget .uacf7-prev,
.penhtech-booking-widget .uacf7-next {
    background: #be9e56;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 140px;
}

.penhtech-booking-widget .uacf7-prev:hover,
.penhtech-booking-widget .uacf7-next:hover {
    background: #be9e56;
    color: #000 !important;
}

.penhtech-booking-widget .uacf7-prev:disabled,
.penhtech-booking-widget .uacf7-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .booking-block {
        padding: 10px;
    }
    .penhtech-booking-widget .uacf7-buttons {
        margin-left: 0;
    }

    .penhtech-booking-widget .uacf7-slidecontainer {
        margin-bottom: 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Response messages */
.penhtech-booking-widget .wpcf7-response-output {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
}

.penhtech-booking-widget .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.penhtech-booking-widget .wpcf7-mail-sent-ng,
.penhtech-booking-widget .wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form field groups */
.penhtech-booking-widget .wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

/* Hidden fields container */
.penhtech-booking-widget .hidden-fields-container {
    display: none;
}

/* Screen reader text */
.penhtech-booking-widget .screen-reader-response {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive adjustments for Contact Form 7 */
@media (min-width: 992.1px) and (max-width: 1200px) {
	.penhtech-booking-widget .wpcf7 .uacf7-col-6 {
	  flex: 0 0 100% !important;
	}

    .penhtech-booking-widget div[step-id="2"] .uacf7-buttons {	
        width: 0;
    }
}

@media (min-width: 768.1px) and (max-width: 992px) {
    .booking-block {
        display: block !important;
    }

    .penhtech-booking-widget {
        margin-bottom: 30px;
        height: 390px;
        min-height: 390px;
    }
}

@media (max-width: 768px) {
    .penhtech-booking-widget .wpcf7-form-control {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 15px;
    }
    
    .penhtech-booking-widget .wpcf7 label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .penhtech-booking-widget .uacf7-buttons {
        /* flex-direction: column; */
        gap: 10px;
        margin-top: 20px;
    }
    
    .penhtech-booking-widget .uacf7-prev,
    .penhtech-booking-widget .uacf7-next {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .penhtech-booking-widget .wpcf7-form-control {
        padding: 8px 12px;
        margin-bottom: 12px;
    }
    
    .penhtech-booking-widget .wpcf7 label {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .penhtech-booking-widget input[type="submit"], .penhtech-booking-widget input[type="submit"] {
        width: 100%;
        padding: 16px;
    }
    
    .penhtech-booking-widget .uacf7-buttons {
        margin-top: 5px;
        padding-top: 15px;
    }
}

/* High contrast mode for form elements */
@media (prefers-contrast: high) {
    .penhtech-booking-widget .wpcf7-form-control {
        border-color: #000;
    }
    
    .penhtech-booking-widget .wpcf7-form-control:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    }
    
}

/* Reduced motion for form elements */
@media (prefers-reduced-motion: reduce) {
    .penhtech-booking-widget .wpcf7-form-control,
    .penhtech-booking-widget .uacf7-prev,
    .penhtech-booking-widget .uacf7-next,
    .penhtech-booking-widget .uacf7_conditional {
        transition: none;
    }
    
    .penhtech-booking-widget .wpcf7-spinner,
    .penhtech-booking-widget .uacf7-ajax-loader {
        animation: none;
    }
}

/* Adjust styling on the Casino > Playing Amount slider */

.penhtech-booking-widget .uacf7-slidecontainer {
    margin-bottom: 20px;
}

/* For WebKit browsers (Chrome, Safari, Edge, Opera) */
input[type="range"]::-webkit-slider-thumb {
  background-color: #be9e56 !important; 
  -webkit-appearance: none;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50%;
}

/* For Mozilla Firefox */
input[type="range"]::-moz-range-thumb {
  background-color: #be9e56 !important; 
  width: 16px !important;
  height: 16px !important;
  border-radius: 50%;
}

.uacf7-slider::-moz-range-thumb {
	background: #be9e56 !important;
}

input[type="range"] {
	background-color: #be9e56 !important;
}