:root {
    --ag-primary: #6c5ce7;
    /* Fallback */
    --ag-text: #2d3436;
    --ag-bg: #f9f9f9;
}

.ag-booking-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Progress Bar */
.ag-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.ag-step {
    font-size: 14px;
    color: #b2bec3;
    font-weight: 600;
}

.ag-step.active {
    color: var(--ag-primary);
}

/* Steps */
.ag-wizard-step {
    display: none;
    animation: fadeIn 0.3s;
}

.ag-wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid */
.ag-grid {
    display: grid;
    grid-template-columns: repeat(var(--ag-grid-cols, 3), 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .ag-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.ag-card-select {
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.ag-card-select:hover {
    border-color: var(--ag-primary);
    transform: translateY(-2px);
}

.ag-card-select.service-card {
    display: flex;
    align-items: center;
    padding: 10px;
}

.ag-service-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.ag-card-select.selected {
    border-color: var(--ag-primary);
    background-color: #f0f0ff;
}

.ag-card-select img:not(.ag-service-logo) {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    height: auto;
    display: block;
}

.ag-card-content {
    padding: 15px;
}

.ag-card-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 700;
}

.ag-card-price {
    color: var(--ag-primary);
    font-weight: 600;
}

/* Forms */
.ag-form-group {
    margin-bottom: 15px;
}

.ag-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.ag-form-group input,
.ag-form-group textarea,
.ag-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ag-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Buttons */
.ag-btn-full {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--ag-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.ag-btn-full:hover {
    opacity: 0.9;
}

.ag-back-btn {
    background: none;
    border: none;
    color: #636e72;
    cursor: pointer;
    margin-bottom: 15px;
    padding: 0;
    font-size: 14px;
}

.ag-back-btn:hover {
    color: var(--ag-text);
}

/* Summary */
.ag-summary-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-line {
    border-bottom: 1px solid #ddd;
    margin: 15px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--ag-primary);
}

/* Spinner */
.ag-spinner {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid var(--ag-primary);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* WooCommerce Checkout Layout Fixes - Simple Grid */
.product-name dl.variation {
    display: grid !important;
    grid-template-columns: max-content auto !important;
    column-gap: 10px;
    row-gap: 5px;
    margin-top: 8px !important;
    border-left: 2px solid var(--ag-primary, #6c5ce7);
    padding-left: 12px;
    font-size: 0.9em;
    align-items: baseline;
}

.product-name dl.variation dt {
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 600;
}

.product-name dl.variation dd {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-name dl.variation dd p {
    margin: 0;
    line-height: normal;
}

.product-name dl.variation::after {
    display: none;
}

/* intl-tel-input Fixes - Removed */

/* Country Selector Emoji Support */
select#ag-country-code {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "Inter", sans-serif;
    padding-right: 20px;
    /* Space for arrow */
}

/* --- Custom Country Selector --- */
.ag-country-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ag-country-selector {
    position: relative;
    /* margin-right: -1px; */
}

.ag-country-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    cursor: pointer;
    min-width: 110px;
    height: 46px;
    box-sizing: border-box;
}

.ag-country-trigger:hover {
    background: #f5f5f5;
}

.ag-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ag-dial-code {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ag-arrow {
    font-size: 10px;
    color: #888;
    margin-left: auto;
}

.ag-country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.ag-country-dropdown.open {
    display: block;
}

.ag-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.ag-country-item:last-child {
    border-bottom: none;
}

.ag-country-item:hover {
    background: #f7f9fa;
}

.ag-country-name {
    font-size: 14px;
    color: #333;
    flex-grow: 1;
}

.ag-country-dial {
    font-size: 12px;
    color: #888;
}

.ag-flag-sm {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* Ensure standard input aligns well */
.ag-country-wrapper input[type="tel"] {
    flex-grow: 1;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}