/* Service Sales Module - Public Styles */

/* ===== Services Grid ===== */
.ssm-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0;
}

@media (max-width: 1023px) {
    .ssm-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ssm-service-card {
    background: #24324a;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.ssm-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.ssm-service-image {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    line-height: 0;
    cursor: pointer;
}

.ssm-service-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ssm-service-card:hover .ssm-service-image img {
    transform: scale(1.04);
}

.ssm-service-content {
    background: #24324a;
    color: #ffffff;
    padding: 28px 24px 24px;
    text-align: center;
}

.ssm-service-title {
    font-size: 30px;
    font-weight: 400;
    margin: 0 0 6px 0;
    color: #ffffff;
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
    line-height: 1.1;
    letter-spacing: 0.3px;
}

.ssm-service-price {
    font-size: 26px;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 22px 0;
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
    line-height: 1.1;
}

.ssm-service-description {
    color: #d1d5db;
    font-size: 14px;
    margin: 8px 0 18px;
    line-height: 1.5;
}

.ssm-book-btn {
    display: inline-block;
    background: #c59d7e;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.ssm-book-btn:hover {
    background: #7b583d;
    transform: translateY(-1px);
}

/* ===== Modal Overlay ===== */
.ssm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.ssm-modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    animation: ssmSlideUp 0.25s ease;
    color: #374151;
}

.ssm-modal,
.ssm-modal *,
.ssm-modal input,
.ssm-modal textarea,
.ssm-modal select,
.ssm-modal button,
.ssm-modal label {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes ssmSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ssm-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ffffff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    z-index: 10;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.ssm-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ===== Modal Header ===== */
.ssm-modal-header {
    background: linear-gradient(135deg, #c59d7e, #7b583d) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 !important;
}

.ssm-modal-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
}

.ssm-modal-price {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    color: #ffffff !important;
}

/* ===== Modal Body ===== */
.ssm-modal-body {
    padding: 14px 24px 18px !important;
    margin: 0 !important;
}

/* ===== Form Row (side by side) ===== */
.ssm-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== Form Styles ===== */
.ssm-form-group {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

.ssm-form-group label {
    display: block !important;
    font-weight: 500 !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
    color: #374151 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.ssm-modal input[type="text"],
.ssm-modal input[type="email"],
.ssm-modal input[type="tel"],
.ssm-modal textarea {
    width: 100% !important;
    padding: 7px 10px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
    color: #1f2937 !important;
    background: #f9fafb !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.4 !important;
}

.ssm-modal input:focus,
.ssm-modal textarea:focus {
    outline: none !important;
    border-color: #c59d7e !important;
    box-shadow: 0 0 0 3px rgba(197, 157, 126, 0.18) !important;
    background: #ffffff !important;
}

.ssm-modal input::placeholder,
.ssm-modal textarea::placeholder {
    color: #9ca3af !important;
}

.ssm-modal textarea {
    resize: vertical;
    min-height: 40px !important;
    max-height: 80px;
}

.ssm-modal input.ssm-input-error,
.ssm-modal textarea.ssm-input-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.ssm-error {
    color: #ef4444 !important;
    font-size: 11px !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    display: block;
    min-height: 0;
    line-height: 1.3 !important;
}

/* ===== Stripe Card Element ===== */
.ssm-card-element {
    padding: 7px 10px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #f9fafb !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ssm-card-element.StripeElement--focus {
    border-color: #c59d7e !important;
    box-shadow: 0 0 0 3px rgba(197, 157, 126, 0.18) !important;
    background: #ffffff !important;
}

.ssm-card-element.StripeElement--invalid {
    border-color: #ef4444 !important;
}

/* ===== Form Error ===== */
.ssm-form-error {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    margin: 0 0 10px 0 !important;
    font-size: 13px !important;
    border: 1px solid #fecaca !important;
}

/* ===== Pay Button ===== */
.ssm-pay-btn {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, #c59d7e, #7b583d) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.1s ease;
    margin: 4px 0 0 0 !important;
    letter-spacing: 0.01em;
    height: auto !important;
    line-height: 1.4 !important;
}

.ssm-pay-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.ssm-pay-btn:active {
    transform: translateY(0);
}

.ssm-pay-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

/* ===== Flatpickr z-index fix ===== */
.flatpickr-calendar {
    z-index: 9999999 !important;
}

/* ===== Success Page ===== */
.ssm-success-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.ssm-success-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    text-align: center;
}

.ssm-success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    line-height: 1;
}

.ssm-success-box h2 {
    font-size: 28px;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.ssm-success-box > p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.ssm-success-details {
    text-align: left;
    margin: 20px 0;
}

.ssm-success-details h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
}

.ssm-success-details table {
    width: 100%;
    border-collapse: collapse;
}

.ssm-success-details table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
}

.ssm-success-details table td:first-child {
    width: 40%;
    color: #666;
}

.ssm-home-btn {
    display: inline-block;
    background: #c59d7e;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.ssm-home-btn:hover {
    background: #7b583d;
    color: #ffffff;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .ssm-services-grid {
        grid-template-columns: 1fr;
    }

    .ssm-modal {
        max-width: 100%;
        margin: 10px;
        border-radius: 10px;
    }

    .ssm-modal-header {
        padding: 14px 18px;
        border-radius: 10px 10px 0 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .ssm-modal-body {
        padding: 16px 18px 20px;
    }

    .ssm-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ssm-success-box {
        padding: 24px;
    }
}
