/**
 * VTS Báo Giá - Frontend Styles
 * Styles for product display and quote functionality
 */

/* CSS Variables */
:root {
    --vts-primary-color: #2196f3;
    --vts-danger-color: #e53935;
    --vts-border-color: #ddd;
    --vts-border-radius: 4px;
    --vts-spacing-sm: 5px;
    --vts-spacing-md: 10px;
    --vts-spacing-lg: 20px;
}

/* Quote Label and Checkbox */
.quote-label {
    cursor: pointer;
    user-select: none;
    z-index: 999;
    position: absolute;
    top: var(--vts-spacing-sm);
    font-size: 80%;
    font-weight: 400;
    line-height: 13px;
    margin-right: var(--vts-spacing-md);
    float: left;
}

.quote-label.active {
    color: var(--vts-primary-color);
}

.quote-checkbox + span.quote-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--vts-border-color);
    display: inline-block;
    position: relative;
}

.quote-checkbox:checked + span.quote-checkbox:after,
.quote-label.active .quote-checkbox + span.quote-checkbox:after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--vts-primary-color);
    top: 3px;
    left: 3px;
    border-radius: 50%;
}

.quote-checkbox + span.quote-checkbox {
    display: none !important;
}

.product-small input[type="checkbox"] {
    padding: 0;
    margin: 0;
}

.quote-label input[type="checkbox"] {
    padding: 0;
    margin: 0;
    float: left;
    margin-right: 2px;
}

/* Product-specific styles */
.single .quote-label {
    display: none;
}

.product-info .quote-label {
    display: block;
    position: relative;
    color: #a60504;
}

.product-info .quote-label.active {
    color: #a60504;
}

/* Quote Icon Container */
.quote-icon-container {
    display: inline-block;
    vertical-align: middle;
}

/* Fixed Icon (for [vts_bao_gia] shortcode) */
.quote-icon-container.vts-fixed-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    display: block;
}

.js-notify-quote-container {
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #fff;
    width: 32px;
    height: 32px;
    display: block !important;
    background: transparent;
    padding: 0;
    position: relative;
}

.js-notify-quote-container svg {
    top: 7px;
    position: absolute;
    right: 9px;
    fill: #ff0000;
}

.vts-quote-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(94, 23, 235), rgb(138, 69, 255));
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.vts-quote-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(94, 23, 235, 0.4);
}

.vts-quote-button svg {
  width: 22px;
  height: 22px;
}

.vts-quote-button-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgb(229, 57, 53);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
}



button.js-notify-quote-container,
a.js-notify-quote-container {
    border-radius: 50%;
    border: 1px solid #ff0000;
}

button.js-notify-quote-container:hover,
button.js-notify-quote-container:focus {
    background: transparent;
    border-color: #ff0000;
}

.js-notify-quote-container .tit {
    display: none;
    top: 45px;
    right: -50px;
    background-color: #333;
    color: white;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.js-notify-quote-container:hover .tit {
    opacity: 1;
}

.js-notify-quote-container .rounded-circle {
    right: -7px;
    background-color: var(--vts-danger-color);
    color: white;
    width: 17px;
    height: 17px;
    line-height: 17px;
    transform: rotate(358deg);
    top: -5px;
    border-radius: 50%;
    position: absolute;
    font-size: 10px;
}

/* Notification */
#quote-notification {
    display: none;
    position: fixed;
    bottom: var(--vts-spacing-lg);
    right: var(--vts-spacing-lg);
    background: #4CAF50;
    color: white;
    padding: var(--vts-spacing-md);
    border-radius: var(--vts-spacing-sm);
    z-index: 9999;
}

/* Quote Button Shortcode */
.vts-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--vts-primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--vts-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.vts-quote-button:hover,
.vts-quote-button:focus {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.vts-quote-button svg {
    flex-shrink: 0;
}

.vts-quote-button-text {
    white-space: nowrap;
    display: none
}

.vts-quote-button-count {
    flex-shrink: 0;
}

/* Screen Reader Only - Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Styles */

/* Mobile - Extra Small (< 576px) */
@media (max-width: 575px) {
    .js-notify-quote-container {
        border: 1px solid #000000;
        width: 40px;
        height: 40px;
    }

    .js-notify-quote-container svg {
        fill: #fff;
        width: 20px;
        right: 9px;
        top: 6px;
    }

    .js-notify-quote-container .rounded-circle {
        display: block !important;
        right: -5px;
        top: -3px;
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }

    .quote-label {
        font-size: 75%;
        line-height: 12px;
    }

    #quote-notification {
        bottom: var(--vts-spacing-md);
        right: var(--vts-spacing-md);
        left: var(--vts-spacing-md);
        font-size: 13px;
        padding: var(--vts-spacing-sm) var(--vts-spacing-md);
    }
}

/* Tablet - Small to Medium (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .js-notify-quote-container {
        width: 36px;
        height: 36px;
    }

    .js-notify-quote-container svg {
        width: 19px;
        right: 8px;
        top: 5px;
    }

    .js-notify-quote-container .rounded-circle {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
    }
}

/* Tablet - Medium (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .js-notify-quote-container {
        width: 34px;
        height: 34px;
    }

    .js-notify-quote-container svg {
        width: 18px;
        right: 7px;
    }
}

/* Desktop - Large (> 1200px) */
@media (min-width: 1200px) {
    .js-notify-quote-container:hover .tit {
        display: block;
        position: absolute;
    }

    .quote-label {
        transition: color 0.2s ease;
    }

    .quote-label:hover {
        color: var(--vts-primary-color);
    }
}
