/**
 * RB Jewellers Catalog - Cart-Inquiry Styles
 *
 * @package    RB_Jewellers_Catalog
 * @since      2.0.0
 */

/* ==========================================================================
   Floating Inquire Now Bar
   ========================================================================== */

.rb-inquire-now-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rb-secondary);
    padding: 15px 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--rb-transition);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.rb-inquire-now-bar.visible {
    transform: translateY(0);
}

.rb-inquire-bar-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.rb-inquire-count {
    color: var(--rb-bg);
    font-size: 15px;
    font-weight: 500;
}

.rb-inquire-count span {
    font-weight: 700;
    color: var(--rb-primary);
}

.rb-inquire-now-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--rb-primary) 0%, var(--rb-primary-dark) 100%);
    color: var(--rb-secondary);
    border: none !important;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--rb-transition);
    position: static !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rb-inquire-now-btn:hover {
    background: linear-gradient(135deg, var(--rb-primary-dark) 0%, var(--rb-primary) 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.rb-inquire-now-btn svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .rb-inquire-bar-inner {
        flex-direction: column;
        gap: 12px;
    }

    .rb-inquire-now-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ==========================================================================
   Inquiry Drawer
   ========================================================================== */

/* Base drawer styles - actual sliding is handled by Enhanced Drawer section */
.rb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 10001;
    pointer-events: none;
}

.rb-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rb-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all var(--rb-transition);
}

.rb-drawer.open .rb-drawer-backdrop {
    opacity: 1;
    visibility: visible;
}

.rb-drawer-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
    background: var(--rb-bg);
}

.rb-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--rb-border);
}

.rb-drawer-title {
    margin: 0;
    font-size: 18px;
}

.rb-cart-count {
    font-weight: 400;
    color: var(--rb-text-light);
}

.rb-drawer-close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--rb-text-light);
}

.rb-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.rb-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--rb-border);
    background: var(--rb-bg);
}

/* Cart Empty */
.rb-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--rb-text-light);
}

.rb-cart-empty .rb-icon-cart {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.rb-cart-empty p {
    margin: 0 0 5px;
}

.rb-cart-empty-hint {
    font-size: 13px;
}

/* Cart Items */
.rb-cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--rb-bg-light);
    border-radius: var(--rb-radius);
    margin-bottom: 10px;
    position: relative;
}

.rb-cart-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--rb-radius-sm);
    overflow: hidden;
}

.rb-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-cart-item-details {
    flex: 1;
    min-width: 0;
}

.rb-cart-item-name {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 500;
}

.rb-cart-item-sku {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--rb-text-muted);
}

.rb-cart-item-qty {
    display: inline-flex;
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius-sm);
    overflow: hidden;
}

.rb-cart-item-qty .rb-qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.rb-cart-item-qty .rb-qty-value {
    width: 40px;
    height: 28px;
    font-size: 13px;
}

.rb-cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--rb-text-muted);
    padding: 0;
}

.rb-cart-item-remove:hover {
    color: var(--rb-danger);
}

/* Cart Summary */
.rb-cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rb-cart-total {
    font-weight: 600;
}

.rb-clear-cart {
    background: none;
    border: none;
    color: var(--rb-danger);
    font-size: 13px;
    cursor: pointer;
}

/* Cart Actions */
.rb-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ==========================================================================
   Inquiry Form
   ========================================================================== */

.rb-inquiry-form-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rb-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.rb-inquiry-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rb-form-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--rb-border);
}

.rb-form-back {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--rb-text-light);
    font-size: 14px;
    cursor: pointer;
}

.rb-form-header h3 {
    margin: 0;
    font-size: 16px;
}

.rb-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.rb-form-group {
    margin-bottom: 20px;
}

.rb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.rb-form-group .required {
    color: var(--rb-danger);
}

.rb-form-group .optional {
    color: var(--rb-text-muted);
    font-weight: 400;
}

.rb-form-group input,
.rb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--rb-transition);
}

.rb-form-group input:focus,
.rb-form-group textarea:focus {
    outline: none;
    border-color: var(--rb-primary);
}

.rb-form-group.has-error input,
.rb-form-group.has-error textarea {
    border-color: var(--rb-danger);
}

.rb-form-error {
    display: none;
    color: var(--rb-danger);
    font-size: 12px;
    margin-top: 5px;
}

.rb-form-group.has-error .rb-form-error {
    display: block;
}

.rb-form-hint {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--rb-text-muted);
}

/* Form Summary */
.rb-form-summary {
    background: var(--rb-bg-light);
    border-radius: var(--rb-radius);
    padding: 15px;
    margin-top: 10px;
}

.rb-form-summary h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.rb-summary-items {
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.rb-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

.rb-summary-item-name {
    color: var(--rb-text);
}

.rb-summary-item-qty {
    color: var(--rb-text-muted);
}

.rb-summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    padding-top: 10px;
    border-top: 1px solid var(--rb-border);
}

/* reCAPTCHA Notice */
.rb-recaptcha-notice {
    margin-top: 15px;
    padding: 10px;
    background: var(--rb-bg-light);
    border-radius: var(--rb-radius-sm);
}

.rb-recaptcha-notice small {
    font-size: 11px;
    color: var(--rb-text-muted);
}

.rb-recaptcha-notice a {
    color: var(--rb-primary);
}

/* Form Footer */
.rb-form-footer {
    padding: 20px;
    border-top: 1px solid var(--rb-border);
}

.rb-submit-btn {
    width: 100%;
}

.rb-btn-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Success State */
.rb-inquiry-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--rb-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.rb-success-icon {
    width: 80px;
    height: 80px;
    background: var(--rb-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.rb-success-icon .rb-icon-check {
    font-size: 40px;
    color: var(--rb-bg);
}

.rb-inquiry-success h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.rb-inquiry-success p {
    margin: 0 0 15px;
    color: var(--rb-text-light);
}

.rb-inquiry-number {
    background: var(--rb-bg-light);
    padding: 10px 20px;
    border-radius: var(--rb-radius);
    margin-bottom: 20px;
}

.rb-inquiry-number strong {
    color: var(--rb-primary);
}

.rb-continue-btn {
    margin-top: 10px;
}


/* ==========================================================================
   Floating Cart Button
   ========================================================================== */

.rb-floating-cart {
    position: fixed;
    width: 60px;
    height: 60px;
    background: var(--rb-primary);
    border: none;
    border-radius: 50%;
    color: var(--rb-bg);
    font-size: 24px;
    box-shadow: var(--rb-shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--rb-transition), background var(--rb-transition);
}

.rb-floating-cart:hover {
    transform: scale(1.1);
    background: var(--rb-primary-dark);
}

.rb-floating-cart.rb-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

.rb-floating-cart.rb-position-bottom-left {
    bottom: 30px;
    left: 30px;
}

.rb-floating-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 24px;
    height: 24px;
    background: var(--rb-danger);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

@media (max-width: 768px) {
    .rb-floating-cart {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .rb-floating-cart.rb-position-bottom-right {
        bottom: 20px;
        right: 20px;
    }

    .rb-floating-cart.rb-position-bottom-left {
        bottom: 20px;
        left: 20px;
    }
}


/* ==========================================================================
   Inquiry Page
   ========================================================================== */

.rb-inquiry-wrapper .rb-inquiry-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .rb-inquiry-wrapper .rb-inquiry-layout {
        grid-template-columns: 1fr;
    }
}

/* Inquiry Sidebar */
.rb-inquiry-sidebar {
    position: sticky;
    top: 30px;
    height: fit-content;
}

.rb-inquiry-summary {
    background: var(--rb-bg);
    border-radius: var(--rb-radius-lg);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}

.rb-summary-title {
    margin: 0;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--rb-border);
}

.rb-inquiry-summary-empty {
    padding: 30px;
    text-align: center;
    color: var(--rb-text-light);
}

.rb-inquiry-summary-empty p {
    margin: 0 0 15px;
}

.rb-inquiry-items-list {
    padding: 20px;
}

.rb-inquiry-items-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.rb-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rb-border);
}

.rb-summary-item:last-child {
    border-bottom: none;
}

.rb-summary-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--rb-radius-sm);
}

.rb-summary-item-info {
    flex: 1;
    min-width: 0;
}

.rb-summary-item-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rb-summary-item-qty {
    font-size: 13px;
    color: var(--rb-text-muted);
}

.rb-inquiry-summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--rb-border);
    margin-top: 15px;
}

.rb-summary-total strong {
    color: var(--rb-primary);
}

.rb-edit-list-link {
    font-size: 13px;
    color: var(--rb-primary);
}

/* Inquiry Form */
.rb-inquiry-main {
    background: var(--rb-bg);
    border-radius: var(--rb-radius-lg);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
}

.rb-inquiry-form {
    padding: 30px;
}

.rb-form-section {
    border: none;
    padding: 0;
    margin: 0 0 30px;
}

.rb-form-section legend {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 0;
}

.rb-form-row {
    margin-bottom: 20px;
}

.rb-form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.rb-form-row .required {
    color: var(--rb-danger);
}

.rb-form-row .optional {
    color: var(--rb-text-muted);
    font-weight: 400;
}

.rb-form-row input,
.rb-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--rb-transition);
}

.rb-form-row input:focus,
.rb-form-row textarea:focus {
    outline: none;
    border-color: var(--rb-primary);
}

.rb-form-row.has-error input,
.rb-form-row.has-error textarea {
    border-color: var(--rb-danger);
}

.rb-field-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--rb-text-muted);
}

.rb-field-error {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--rb-danger);
}

.rb-form-row.has-error .rb-field-error {
    display: block;
}

/* Send Options */
.rb-send-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rb-send-option {
    cursor: pointer;
}

.rb-send-option input {
    position: absolute;
    opacity: 0;
}

.rb-option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--rb-border);
    border-radius: var(--rb-radius);
    transition: all var(--rb-transition);
}

.rb-send-option input:checked + .rb-option-content {
    border-color: var(--rb-primary);
    background: rgba(212, 175, 55, 0.05);
}

.rb-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rb-whatsapp-icon {
    background: rgba(37, 211, 102, 0.1);
    color: var(--rb-whatsapp);
}

.rb-email-icon {
    background: rgba(212, 175, 55, 0.1);
    color: var(--rb-primary);
}

.rb-both-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--rb-success);
}

.rb-option-text {
    display: flex;
    flex-direction: column;
}

.rb-option-text strong {
    font-size: 15px;
    color: var(--rb-text);
}

.rb-option-text span {
    font-size: 13px;
    color: var(--rb-text-light);
}

/* Form Actions */
.rb-form-actions {
    margin-top: 30px;
}

.rb-submit-inquiry {
    width: 100%;
}

/* Success Message */
.rb-inquiry-success {
    padding: 60px 30px;
    text-align: center;
}

.rb-success-icon {
    width: 80px;
    height: 80px;
    background: var(--rb-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: #fff;
}

.rb-inquiry-success h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: var(--rb-text);
}

.rb-inquiry-success p {
    margin: 0 0 20px;
    color: var(--rb-text-light);
}

.rb-inquiry-number {
    background: var(--rb-bg-light);
    padding: 15px 25px;
    border-radius: var(--rb-radius);
    display: inline-block;
    margin-bottom: 25px;
}

.rb-inquiry-number span {
    display: block;
    font-size: 14px;
    color: var(--rb-text-light);
    margin-bottom: 5px;
}

.rb-inquiry-number strong {
    font-size: 20px;
    color: var(--rb-primary);
}

.rb-success-actions {
    margin-top: 20px;
}


/* ==========================================================================
   Floating Cart Button
   ========================================================================== */

.rb-floating-btn {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 26, 46, 0.4);
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rb-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(26, 26, 46, 0.5);
}

.rb-floating-btn:active {
    transform: scale(0.95);
}

.rb-floating-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.rb-floating-bottom-right {
    bottom: 30px;
    right: 30px;
}

.rb-floating-bottom-left {
    bottom: 30px;
    left: 30px;
}

.rb-floating-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    background: #D4AF37;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.rb-floating-count:empty,
.rb-floating-count[data-count="0"] {
    display: none;
}

@media (max-width: 768px) {
    .rb-floating-btn {
        width: 56px;
        height: 56px;
    }

    .rb-floating-btn svg {
        width: 24px;
        height: 24px;
    }

    .rb-floating-bottom-right {
        bottom: 20px;
        right: 20px;
    }

    .rb-floating-bottom-left {
        bottom: 20px;
        left: 20px;
    }
}


