/* ==========================================================
   Green Olive Booking — Customer Form Styles
   File: green-olive-booking/assets/go-booking.css
   ========================================================== */

/* ---------- Inline Customer Form Container ---------- */
#go-customer-form {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease;
}

#go-customer-form.go-form-open {
    max-height: 900px;
    opacity: 1;
}

/* ---------- Inner wrapper ---------- */
.go-customer-form-inner {
    padding-top: 24px;
    border-top: 2px solid #f0f4e8;
    margin-top: 16px;
}

/* ---------- Form heading ---------- */
.go-form-title {
    font-size: 17px;
    font-weight: 700;
    color: #556b2f;
    margin: 0 0 18px;
}

/* ---------- Form groups ---------- */
.go-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.go-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---------- Labels ---------- */
.go-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.go-form-group label .go-required {
    color: #e53e3e;
    margin-left: 2px;
}

/* ---------- Inputs, selects, textareas ---------- */
.go-form-group input,
.go-form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #dde3d5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafcf7;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.go-form-group input:focus,
.go-form-group textarea:focus {
    border-color: #556b2f;
    box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.12);
    background: #fff;
}

.go-form-group input::placeholder,
.go-form-group textarea::placeholder {
    color: #aaa;
    font-size: 13px;
}

.go-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

/* ---------- Confirm Booking button ---------- */
.go-confirm-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    background: #556b2f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    letter-spacing: 0.3px;
}

.go-confirm-btn:hover:not(:disabled) {
    background: #6b8538;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(85, 107, 47, 0.3);
}

.go-confirm-btn:active:not(:disabled) {
    transform: translateY(0);
}

.go-confirm-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loading spinner state */
.go-confirm-btn.go-loading::after {
    content: ' ';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: go-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes go-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Back button ---------- */
.go-back-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: transparent;
    color: #888;
    border: 1.5px solid #dde3d5;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.go-back-btn:hover {
    color: #556b2f;
    border-color: #556b2f;
}

/* ---------- Form messages (error / info) ---------- */
.go-form-message {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.go-msg-error {
    display: block;
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 10px 12px;
}

.go-msg-info {
    display: block;
    color: #555;
    background: #f0f4e8;
    border: 1px solid #c6d9a0;
    border-radius: 6px;
    padding: 10px 12px;
}

/* ---------- Success State ---------- */
.go-success-state {
    text-align: center;
    padding: 20px 10px 10px;
    animation: go-fade-in 0.5s ease;
}

@keyframes go-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.go-success-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.go-success-state h3 {
    color: #556b2f;
    font-size: 20px;
    margin: 0 0 10px;
}

.go-success-state p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px;
}

.go-success-sub {
    color: #999;
    font-size: 13px;
}

/* ---------- Hide the original Book Now while form is open ---------- */
.go-book-btn-hidden {
    display: none !important;
}

/* ---------- Book Now error (no services selected) ---------- */
.go-book-btn-error {
    margin-top: 10px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 3px solid #e53e3e;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.go-book-btn-error-visible {
    opacity: 1;
    transform: translateY(0);
}
