/**
 * Frontend styles for Mandatory Field for PSP
 */

/* Mandatory field indicator */
.mffpsp-mandatory-field {
    position: relative;
}

.mffpsp-mandatory-indicator {
    position: absolute;
    top: 0;
    left: -5px;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #2271b1, #135e96);
    border-radius: 2px;
}

.mffpsp-mandatory-input {
    border-color: #2271b1 !important;
    background-color: #f0f7fc !important;
}

.mffpsp-mandatory-input:focus {
    border-color: #135e96 !important;
    box-shadow: 0 0 0 1px #135e96 !important;
}

/* Required marker */
.mffpsp-required-marker {
    color: #d63638;
    font-weight: bold;
    margin-left: 3px;
    text-decoration: none;
    border: none !important;
}

/* Notification */
.mffpsp-notification {
    background: #fff;
    border: 1px solid #2271b1;
    border-left-width: 4px;
    border-radius: 4px;
    margin: 20px 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mffpsp-notification-content {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    gap: 15px;
}

.mffpsp-notification-icon {
    font-size: 24px;
    color: #2271b1;
    line-height: 1;
    flex-shrink: 0;
}

.mffpsp-notification-messages {
    flex: 1;
}

.mffpsp-notification-messages p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #1e1e1e;
}

.mffpsp-notification-messages p:last-child {
    margin-bottom: 0;
}

.mffpsp-notification-messages strong {
    color: #2271b1;
}

.mffpsp-notification-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.mffpsp-notification-close:hover {
    color: #d63638;
}

/* Invalid field state */
.mffpsp-invalid {
    border-color: #d63638 !important;
    background-color: #fcf0f1 !important;
}

.mffpsp-invalid:focus {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

/* Field error message */
.mffpsp-field-error {
    display: block;
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 400;
}

/* Animation for mandatory state */
@keyframes mffpsp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 113, 177, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0);
    }
}

.mffpsp-mandatory-input {
    animation: mffpsp-pulse 1s ease-out;
}

/* RTL Support */
[dir="rtl"] .mffpsp-mandatory-indicator {
    left: auto;
    right: -5px;
}

[dir="rtl"] .mffpsp-notification {
    border-left-width: 1px;
    border-right-width: 4px;
}

[dir="rtl"] .mffpsp-required-marker {
    margin-left: 0;
    margin-right: 3px;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .mffpsp-notification-content {
        padding: 12px 15px;
    }

    .mffpsp-notification-icon {
        font-size: 20px;
    }

    .mffpsp-notification-messages p {
        font-size: 13px;
    }
}
