/* Frontend Styles for Discount Popup SMS Plugin */

/* Popup Overlay */
.dps-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: dps-fade-in 0.3s ease-out forwards;
}

@keyframes dps-fade-in {
    to {
        opacity: 1;
    }
}

.dps-popup-overlay.dps-closing {
    animation: dps-fade-out 0.3s ease-out forwards;
}

@keyframes dps-fade-out {
    to {
        opacity: 0;
    }
}

/* Popup Container */
.dps-popup-container {
    width: 90%;
    max-width: 500px;
    animation: dps-slide-up 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes dps-slide-up {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Custom Style Popup */
.dps-popup-custom {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    direction: rtl;
}

.dps-popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s;
    z-index: 10;
}

.dps-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #374151;
    transform: rotate(90deg);
}

.dps-popup-content {
    padding: 40px 30px 30px;
}

/* Popup Header */
.dps-popup-header {
    text-align: center;
    margin-bottom: 30px;
}

.dps-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--dps-primary-color) 0%, var(--dps-secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dps-icon-pulse 2s infinite;
}

@keyframes dps-icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(79, 70, 229, 0);
    }
}

.dps-popup-icon svg {
    width: 40px;
    height: 40px;
    color: #fff;
}

.dps-popup-title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
}

.dps-popup-description {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
}

/* Form Styles */
.dps-discount-form {
    margin-bottom: 20px;
}

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

.dps-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.dps-label-icon {
    width: 18px;
    height: 18px;
    color: var(--dps-primary-color);
}

.dps-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.dps-input:focus {
    outline: none;
    border-color: var(--dps-primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.dps-input::placeholder {
    color: #9ca3af;
}

/* Submit Button */
.dps-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--dps-primary-color) 0%, var(--dps-secondary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dps-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.dps-submit-btn:hover::before {
    left: 100%;
}

.dps-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.dps-submit-btn:active {
    transform: translateY(0);
}

.dps-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dps-btn-loader {
    display: inline-block;
}

/* Spinner */
.dps-spinner {
    animation: dps-rotate 1s linear infinite;
    width: 20px;
    height: 20px;
}

@keyframes dps-rotate {
    100% {
        transform: rotate(360deg);
    }
}

.dps-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dps-dash 1.5s ease-in-out infinite;
}

@keyframes dps-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Message */
.dps-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: dps-message-slide 0.3s ease-out;
}

@keyframes dps-message-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dps-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.dps-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Popup Footer */
.dps-popup-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.dps-footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.dps-footer-icon {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* Image Style Popup */
.dps-popup-image {
    position: relative;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dps-popup-image-wrapper {
    position: relative;
    min-height: 400px;
}

.dps-popup-image-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dps-popup-form-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    padding: 40px 30px 30px;
    direction: rtl;
}

.dps-popup-image .dps-input {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.dps-popup-image .dps-input:focus {
    background: #fff;
}

/* Responsive */
@media (max-width: 640px) {
    .dps-popup-container {
        width: 95%;
        max-width: none;
    }
    
    .dps-popup-content {
        padding: 30px 20px 20px;
    }
    
    .dps-popup-title {
        font-size: 24px;
    }
    
    .dps-popup-description {
        font-size: 14px;
    }
    
    .dps-popup-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .dps-popup-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* RTL Specific */
[dir="rtl"] .dps-popup-close {
    right: 15px;
    left: auto;
}

/* Print Styles */
@media print {
    .dps-popup-overlay {
        display: none !important;
    }
}
