/* Product Modal Styles - Scoped to .product-modal-container */

/* Animation Keyframes */
@keyframes pm-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pm-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

@keyframes pm-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Container and Form */
.product-modal-container #productForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Variant Section */
.product-modal-container .pm-variant-section {
    margin-bottom: 0px;
}

.product-modal-container .pm-variant-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.product-modal-container .pm-required {
    color: #ef4444;
}

.product-modal-container .pm-variant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-modal-container .pm-variant-tag {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.product-modal-container .pm-variant-tag:hover:not(.pm-selected) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #a78bfa;
}

.product-modal-container .pm-variant-tag.pm-selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Instruction Box */
.product-modal-container .pm-instruction-box {
    margin-top: 12px;
    padding: 12px;
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
}

.product-modal-container .pm-instruction-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.product-modal-container .pm-instruction-icon {
    color: #f59e0b;
    font-size: 16px;
}

.product-modal-container .pm-instruction-text {
    flex: 1;
}

.product-modal-container .pm-instruction-title {
    font-weight: 600;
    color: #92400e;
    margin: 0;
    font-size: 14px;
}

.product-modal-container .pm-instruction-desc {
    color: #b45309;
    margin: 4px 0 0 0;
    font-size: 13px;
    line-height: 1.4;
}

/* Quantity Selector */
.product-modal-container .pm-quantity-section {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 14px;
}

.product-modal-container .pm-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-modal-container .pm-quantity-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.product-modal-container .pm-quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 10px;
    padding: 4px;
    border: 1px solid #e5e7eb;
}

.product-modal-container .pm-quantity-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-modal-container .pm-quantity-btn.pm-decrease {
    color: #ef4444;
}

.product-modal-container .pm-quantity-btn.pm-decrease:hover {
    background-color: #fef2f2;
}

.product-modal-container .pm-quantity-btn.pm-increase {
    color: #10b981;
}

.product-modal-container .pm-quantity-btn.pm-increase:hover {
    background-color: #f0fdf4;
}

.product-modal-container .pm-quantity-btn svg {
    width: 18px;
    height: 18px;
}

.product-modal-container .pm-quantity-input {
    width: 70px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: none;
    background: transparent;
    outline: none;
    color: #111827;
}

/* Address Field */
.product-modal-container .pm-address-section {
    position: relative;
}

.product-modal-container .pm-address-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.product-modal-container .pm-address-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    line-height: 1.5;
    font-family: inherit;
}

.product-modal-container .pm-address-textarea:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.1);
}

.product-modal-container .pm-address-textarea.pm-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Promo Box */
.product-modal-container .pm-promo-box {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #faf5ff 0%, #fce7f3 50%, #ddd6fe 100%);
    border-radius: 12px;
    padding: 14px;
    border: 2px solid #e9d5ff;
}

.product-modal-container .pm-promo-decoration-1 {
    position: absolute;
    top: -20px;
    right: -20px;
    opacity: 0.1;
    font-size: 80px;
    transform: rotate(-15deg);
}

.product-modal-container .pm-promo-decoration-2 {
    position: absolute;
    bottom: -15px;
    left: -15px;
    opacity: 0.1;
    font-size: 60px;
    transform: rotate(15deg);
}

.product-modal-container .pm-promo-decoration-3 {
    position: absolute;
    top: 50%;
    right: 20px;
    opacity: 0.08;
    font-size: 40px;
}

.product-modal-container .pm-promo-content {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    z-index: 1;
}

.product-modal-container .pm-promo-icon {
    font-size: 20px;
    animation: pm-pulse 2s infinite;
}

.product-modal-container .pm-promo-text {
    flex: 1;
}

.product-modal-container .pm-promo-title {
    font-size: 14px;
    font-weight: 600;
    color: #7c3aed;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.product-modal-container .pm-promo-desc {
    font-size: 14px;
    color: #9333ea;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.product-modal-container .pm-promo-highlight {
    color: #7c3aed;
    font-size: 16px;
    font-weight: bold;
}

/* Pricing Card */
.product-modal-container .pm-pricing-card {
    background: linear-gradient(to bottom right, #f9fafb, white);
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
}

.product-modal-container .pm-pricing-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-modal-container .pm-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-modal-container .pm-pricing-label {
    font-size: 14px;
    color: #6b7280;
}

.product-modal-container .pm-pricing-value {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.product-modal-container .pm-pricing-discount {
    color: #ef4444;
}

.product-modal-container .pm-pricing-total-row {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-modal-container .pm-pricing-total-label {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
}

.product-modal-container .pm-pricing-total-value {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Error Tooltip */
.product-modal-container .pm-error-tooltip {
    position: absolute;
    z-index: 10;
    margin-top: 6px;
    padding: 10px 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pm-fadeInUp 0.2s ease-out;
    width: auto;
    max-width: 280px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.product-modal-container .pm-error-tooltip-arrow {
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    background-color: #fef2f2;
    border-left: 1px solid #fecaca;
    border-top: 1px solid #fecaca;
    transform: rotate(45deg);
}

.product-modal-container .pm-error-icon {
    font-size: 14px;
}

/* General Error Message */
.product-modal-container .pm-general-error {
    margin-top: 12px;
    padding: 12px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-modal-container .pm-general-error-icon {
    font-size: 16px;
}

/* Animation Classes */
.product-modal-container .pm-shake {
    animation: pm-shake 0.4s;
}

/* Hidden Input */
.product-modal-container input[type="hidden"] {
    display: none;
}

/* Submit Button Styles - Replace Tailwind Classes */
.product-modal-container .pm-submit-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    min-width: 120px;
}

.product-modal-container .pm-submit-button:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-modal-container .pm-submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}