/* BarghPro Smart Quotes - Frontend styling */

/* Overlay */
.bp-quotes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    direction: rtl;
}

/* Modal Box */
.bp-quotes-modal {
    background: #ffffff;
    width: 100%;
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 32px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    font-family: 'Peyda', 'Vazirmatn', 'IRANSans', sans-serif;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Animations */
.animate-slide-in {
    animation: bpSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bpSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.bp-quotes-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.bp-quotes-close:hover {
    color: #0f172a;
}

/* Header */
.bp-quotes-header {
    margin-bottom: 24px;
    text-align: right;
}
.bp-quotes-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}
.bp-quotes-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* Forms layout */
.bp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 580px) {
    .bp-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.bp-form-group {
    margin-bottom: 16px;
    text-align: right;
}
.bp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}
.bp-form-group input[type="text"],
.bp-form-group input[type="tel"],
.bp-form-group input[type="email"],
.bp-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    text-align: right;
}
.bp-form-group input:focus,
.bp-form-group textarea:focus {
    outline: none;
    border-color: #1A91DD;
    box-shadow: 0 0 0 3px rgba(26, 145, 221, 0.15);
}

/* Upload input */
.bp-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
}
.bp-upload-label:hover {
    border-color: #1A91DD;
    background: #f0f9ff;
}
.bp-upload-icon {
    font-size: 18px;
    margin-left: 8px;
}
.bp-upload-text {
    font-size: 13px;
    color: #475569;
}
.bp-file-name {
    font-size: 12px;
    color: #1a91dd;
    margin-top: 6px;
    text-align: right;
}

/* Primary Button */
.bp-btn-primary {
    background-color: #1A91DD;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: background-color 0.2s ease;
}
.bp-btn-primary:hover {
    background-color: #1579ba;
}
.bp-btn-primary:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Spinner */
.bp-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bp-spin 0.8s ease-in-out infinite;
    margin-right: 8px;
}
@keyframes bp-spin {
    to { transform: rotate(360deg); }
}

/* Responses */
.bp-response-msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}
.bp-response-msg.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.bp-response-msg.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Success Action Button */
.bp-success-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.bp-success-actions a {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}
.bp-action-view {
    background-color: #1A91DD;
    color: #ffffff !important;
    border: 2px solid #1A91DD;
    display: block;
}
.bp-action-view:hover {
    background-color: #1579ba;
    border-color: #1579ba;
}

/* Button Soft Glow Highlight Animation (Requirements 8 & 9) */
.bp-pulse-highlight {
    animation: bpPulseGlow 2.5s ease-in-out forwards;
}

@keyframes bpPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 145, 221, 0.7);
        transform: scale(1);
    }
    30% {
        box-shadow: 0 0 20px 6px rgba(26, 145, 221, 0.5);
        transform: scale(1.03);
    }
    60% {
        box-shadow: 0 0 12px 3px rgba(26, 145, 221, 0.3);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(26, 145, 221, 0);
        transform: scale(1);
    }
}
