/* Professional Transport Manager - Public Styles */

/* Return to services button */
.ptm-btn-return {
    background: #f0f0f1;
    color: #2c3338;
    border: 1px solid #dcdcde;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ptm-btn-return:hover {
    background: #e9e9ea;
    border-color: #c3c4c7;
    color: #1d2327;
}

.ptm-btn-return .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Service Selector */
body .ptm-booking-wrapper {
    max-width: 740px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px;
}

.ptm-service-selector {
    margin-bottom: 40px;
    text-align: center;
}

.ptm-service-selector h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.ptm-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.ptm-service-card {
    background: linear-gradient(135deg, #446084 0%, #4d73a6 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ptm-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.ptm-service-card .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.ptm-service-card h3 {
    font-size: 22px;
    margin: 15px 0 10px;
    color: white;
}

.ptm-service-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Form Container */
.ptm-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 40px;
}

.ptm-form h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

/* Multi-step Form */
.ptm-form-step {
    display: none;
}

.ptm-form-step.ptm-step-active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ptm-form-step h3 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #444;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ptm-price-display .price-breakdown {
    display: none;
}

/* Form Groups */
.ptm-form-group {
    margin-bottom: 25px;
}

.ptm-inline-help {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

.ptm-whatsapp-help a {
    margin-left: 6px;
    font-weight: 600;
    color: #007a5a;
    text-decoration: underline;
}

.ptm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.ptm-form-group input[type="text"],
.ptm-form-group input[type="email"],
.ptm-form-group input[type="tel"],
.ptm-form-group input[type="number"],
.ptm-form-group input[type="date"],
.ptm-form-group input[type="time"],
.ptm-form-group input[type="datetime-local"],
.ptm-form-group select,
.ptm-form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.ptm-form-group input[type="date"],
.ptm-form-group input[type="time"] {
    min-height: 44px;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.ptm-form-group input[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606f83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

.ptm-form-group input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606f83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}

.ptm-date-time-row {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 14px;
}

.ptm-date-time-row .ptm-form-group {
    margin-bottom: 0;
}

.ptm-phone-row {
    grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.ptm-phone-row .ptm-form-group {
    margin-bottom: 0;
}

.ptm-phone-country-wrap .iti {
    width: 100%;
    display: block;
}

.ptm-phone-country-wrap .iti__tel-input {
    width: 100%;
    min-height: 44px;
}

.ptm-phone-country-wrap .iti__country-list {
    z-index: 100001;
}

.ptm-form-group input:focus,
.ptm-form-group select:focus,
.ptm-form-group textarea:focus {
    outline: none;
    border-color: #446084;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.ptm-modal-open {
    overflow: hidden;
}

.ptm-multicity-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    padding: 24px;
}

.ptm-multicity-modal-dialog {
    max-width: 640px;
    margin: 5vh auto;
    background: #fff;
    border-radius: 10px;
    padding: 24px 24px 18px;
    position: relative;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.ptm-multicity-modal-dialog h4 {
    margin: 0 24px 12px 0;
    font-size: 20px;
    color: #223;
}

.ptm-multicity-modal-dialog ol {
    margin: 0 0 12px 20px;
    padding: 0;
}

.ptm-multicity-modal-dialog li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.ptm-multicity-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.ptm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ptm-rental-form .ptm-form-step h3 {
    margin-bottom: 14px;
}

.ptm-rental-form .ptm-form-step h4 {
    margin: 20px 0 10px;
    font-size: 18px;
}

.ptm-rental-step-note {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 14px;
}

.ptm-rental-form .ptm-form-group label {
    font-weight: 600;
}

.ptm-rental-form .ptm-form-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ptm-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.ptm-btn-secondary:hover {
    background: #e5e7eb;
}

.ptm-rental-form .ptm-availability-message {
    margin: 10px 0 14px;
}

/* Vehicle Options */
.ptm-vehicle-options {
    display: grid;
    gap: 15px;
}

.ptm-vehicle-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ptm-vehicle-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.ptm-vehicle-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
}

body #ptm-form-container,
body .ptm-form-container {
    max-width: 700px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

body #ptm-form-container .ptm-form,
body .ptm-form-container .ptm-form,
body .ptm-booking-wrapper .ptm-form {
    max-width: 620px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Support standalone shortcodes (ptm_taxi_form, ptm_driver_form, etc.)
   where no #ptm-form-container/.ptm-booking-wrapper ancestor exists. */
body .ptm-form.ptm-taxi-form,
body .ptm-form.ptm-driver-form,
body .ptm-form.ptm-rental-form,
body .ptm-form.ptm-tour-form {
    max-width: 620px !important;
    width: min(100%, 620px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ptm-vehicle-option input[type="radio"]:checked + .option-content {
    color: #667eea;
}

.ptm-vehicle-option .option-content {
    flex: 1;
}
.ptm-terms-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
    padding: 24px;
}

.ptm-terms-modal-dialog {
    max-width: 700px;
    margin: 4vh auto;
    background: #fff;
    border-radius: 10px;
    padding: 24px 24px 18px;
    position: relative;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    max-height: 85vh;
    overflow-y: auto;
}

.ptm-terms-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

.ptm-terms-content {
    line-height: 1.6;
    color: #333;
}

.ptm-tier-section-title {
    margin: 10px 0 8px;
    font-size: 15px;
    color: #2f3a46;
}

.ptm-vehicle-option strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    body #ptm-form-container,
    body .ptm-form-container,
    body #ptm-form-container .ptm-form,
    body .ptm-form-container .ptm-form,
    body .ptm-booking-wrapper .ptm-form {
        max-width: 100% !important;
        width: 100% !important;
    }

    .ptm-form-container {
        padding: 20px;
    }
}

.ptm-tour-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.ptm-tour-vehicle-card {
    display: block;
}

.ptm-tour-vehicle-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ptm-tour-vehicle-card-inner {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.ptm-tour-vehicle-card input[type="radio"]:checked + .ptm-tour-vehicle-card-inner {
    border-color: #446084;
    box-shadow: 0 0 0 3px rgba(68, 96, 132, 0.15);
}

.ptm-tour-vehicle-image-wrap {
    width: 100%;
    height: 130px;
    background: #f4f4f4;
}

.ptm-tour-vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ptm-tour-vehicle-info {
    padding: 10px 12px;
}

.ptm-tour-vehicle-info strong {
    display: block;
    margin-bottom: 5px;
}

.ptm-tour-vehicle-info span {
    font-size: 13px;
    color: #555;
}

.ptm-room-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ptm-room-selection-item {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 10px;
    background: #fbfbfb;
}

.ptm-room-selection-item label {
    margin-bottom: 6px;
}

.ptm-room-selection-summary {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.ptm-vehicle-option span {
    font-size: 13px;
    color: #777;
}

/* 3-Tier Vehicle System */
.ptm-vehicle-option .option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.ptm-vehicle-option .vehicle-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.ptm-vehicle-option .vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ptm-vehicle-option .vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ptm-vehicle-option .tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    width: fit-content;
}

.tier-badge-3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #333;
}

.tier-badge-2 {
    background: linear-gradient(135deg, #667eea 0%, #446084 100%);
    color: white;
}

.tier-badge-1 {
    background: #e0e0e0;
    color: #666;
}

.ptm-vehicle-option .category-label {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.ptm-vehicle-option .capacity {
    font-size: 13px;
    color: #777;
}

/* Tier-specific card borders */
.ptm-tier-3.ptm-vehicle-option {
    border-color: #ffd700;
    background: #fffef8;
}

.ptm-tier-3.ptm-vehicle-option:hover {
    border-color: #ffa500;
    background: #fffdf0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.ptm-tier-2.ptm-vehicle-option {
    border-color: #d0d0e0;
}

.ptm-tier-2.ptm-vehicle-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.ptm-tier-1.ptm-vehicle-option {
    border-color: #e0e0e0;
    opacity: 0.9;
}

.ptm-tier-1.ptm-vehicle-option:hover {
    border-color: #999;
    background: #f9f9f9;
}

/* Price Display */
.ptm-price-display {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border-left: 4px solid #667eea;
}

.ptm-price-display h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.price-breakdown {
    margin-bottom: 20px;
}

.price-details {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid rgba(0,0,0,0.1);
}

.total-price span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.price-amount {
    font-size: 28px;
    color: #667eea;
    font-weight: bold;
}

/* Buttons */
.ptm-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.ptm-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ptm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ptm-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ptm-btn-next,
.ptm-btn-calculate,
.ptm-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #446084 100%);
    color: white;
    flex: 1;
}

.ptm-btn-prev {
    background: #f0f0f0;
    color: #666;
}

.ptm-btn-quote {
    background: #9C27B0;
    color: white;
}

.ptm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ptm-btn-check-availability {
    background: #2196F3;
    color: white;
    flex: 1;
}

/* Available Vehicles */
.ptm-available-vehicles {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.vehicle-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.vehicle-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Loading States */
.ptm-loading {
    text-align: center;
    padding: 30px;
}

.ptm-loading:after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ptm-service-grid {
        grid-template-columns: 1fr;
    }
    
    .ptm-form-container {
        padding: 25px;
    }
    
    .ptm-form-row {
        grid-template-columns: 1fr;
    }

    .ptm-date-time-row,
    .ptm-phone-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ptm-form-actions {
        flex-direction: column;
    }
    
    .price-amount {
        font-size: 24px;
    }
}

/* Success Message */
.ptm-success-message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.ptm-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* Vehicle Cards Grid */
.ptm-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ptm-vehicle-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ptm-vehicle-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.ptm-vehicle-image {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ptm-vehicle-image svg {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.ptm-vehicle-image img {
    width: 100%;
    max-width: 220px;
    max-height: 130px;
    object-fit: cover;
    border-radius: 8px;
}

.ptm-vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ptm-vehicle-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.ptm-vehicle-capacity {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.ptm-capacity-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.ptm-capacity-item svg {
    width: 16px;
    height: 16px;
}

.ptm-vehicle-pricing {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.ptm-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.ptm-price-row:last-child {
    margin-bottom: 0;
}

.ptm-price-total {
    padding-top: 10px;
    margin-top: 10px;
    border-top: 2px solid #ddd;
    font-size: 16px;
    color: #333;
}

.ptm-btn-select-vehicle {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.ptm-btn-select-vehicle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ptm-btn-select-vehicle:active {
    transform: translateY(0);
}

/* Availability Notice */
.ptm-notice {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ptm-notice-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.ptm-notice p {
    margin: 5px 0;
}

.ptm-notice p:first-child {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ptm-vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .ptm-vehicle-capacity {
        flex-direction: column;
        gap: 8px;
    }
}
