/**
 * Phone Modal Styles
 * استایل‌های مودال ثبت شماره تلفن
 */

/* Modal Overlay & Container */
.woodmart-phone-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.woodmart-phone-modal.active {
    display: flex;
    opacity: 1;
}

.woodmart-phone-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* Modal Content */
.woodmart-phone-modal-content {
    position: relative;
    margin: auto;
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.4s ease;
}

.woodmart-phone-modal-inner {
    background: linear-gradient(135deg, #2c5f7f 0%, #4a7fa0 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    direction: rtl;
}

/* Modal Icon */
.modal-icon {
    margin: 0 auto 20px;
    position: relative;
    width: 80px;
    height: 80px;
    display: inline-block;
}

.modal-icon svg {
    display: block;
}

.modal-icon .headset-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Success Icon */
.success-icon svg {
    animation: scaleIn 0.5s ease;
}

/* Modal Text */
.modal-top-text {
    font-size: 13px;
    margin: 0 0 15px;
    opacity: 0.9;
    font-weight: 400;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px;
    line-height: 1.4;
    color: #ffffff;
}

.modal-bottom-text {
    font-size: 13px;
    margin: 20px 0 0;
    opacity: 0.85;
    font-weight: 400;
    line-height: 1.6;
}

/* Form Group */
.form-group {
    margin-bottom: 25px;
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #ffffff;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    text-align: center;
    direction: ltr;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.form-control::placeholder {
    color: #999;
    direction: rtl;
    text-align: center;
}

.error-message {
    display: block;
    color: #ff5252;
    font-size: 13px;
    margin-top: 8px;
    text-align: right;
    background: rgba(255, 82, 82, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border-right: 3px solid #ff5252;
}

/* Modal Buttons */
.modal-button {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.modal-button-primary {
    background: #ff6b35;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.modal-button-primary:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.modal-button-primary:active {
    transform: translateY(0);
}

.modal-button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.modal-button-success {
    background: #ff6b35;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.modal-button-success:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* Button Loader */
.button-loader {
    display: inline-block;
    vertical-align: middle;
}

.spinner {
    animation: rotate 2s linear infinite;
}

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

/* Phone Display */
.modal-phone-display {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 18px;
    margin: 25px 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    direction: ltr;
    color: #ffffff;
}

/* Close Button */
.woodmart-phone-modal-close {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.woodmart-phone-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes 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;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .woodmart-phone-modal-content {
        width: 95%;
    }

    .woodmart-phone-modal-inner {
        padding: 40px 25px;
        border-radius: 15px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-icon {
        width: 70px;
        height: 70px;
    }

    .modal-icon svg {
        width: 70px;
        height: 70px;
    }

    .modal-phone-display {
        font-size: 18px;
        padding: 15px;
    }

    .woodmart-phone-modal-close {
        bottom: -50px;
        font-size: 13px;
        padding: 10px 25px;
    }
}

@media (max-width: 480px) {
    .modal-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .modal-top-text,
    .modal-bottom-text {
        font-size: 12px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 15px;
    }

    .modal-button {
        padding: 14px 25px;
        font-size: 15px;
    }
}

/* RTL Support */
[dir="rtl"] .form-control {
    text-align: center;
}

/* Accessibility */
.woodmart-phone-modal-close:focus,
.modal-button:focus,
.form-control:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .woodmart-phone-modal {
        display: none !important;
    }
}