/* ================================================
   PropertyKE – Message Modal
   ================================================ */

/* Overlay */
.pk-msg-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pk-msg-modal--open {
    opacity: 1;
}

.pk-msg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Card */
.pk-msg-modal__card {
    position: relative;
    width: 94%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.25);
    padding: 1.75rem;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s ease;
}

.pk-msg-modal--open .pk-msg-modal__card {
    transform: translateY(0) scale(1);
}

/* Close button */
.pk-msg-modal__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    z-index: 2;
}

.pk-msg-modal__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Header */
.pk-msg-modal__header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
}

.pk-msg-modal__icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #0041d9 0%, #3b6ff5 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.pk-msg-modal__title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.1rem;
    line-height: 1.3;
}

.pk-msg-modal__subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

/* Sender info (logged in) */
.pk-msg-modal__sender-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

.pk-msg-modal__sender-info i {
    color: #0041d9;
    font-size: 0.85rem;
}

.pk-msg-modal__sender-info strong {
    color: #0f172a;
}

/* Form Fields */
.pk-msg-modal__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pk-msg-modal__field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.3rem;
}

.pk-msg-modal__field input,
.pk-msg-modal__field textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    font-size: 0.85rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.pk-msg-modal__field input:focus,
.pk-msg-modal__field textarea:focus {
    border-color: #0041d9;
    box-shadow: 0 0 0 3px rgba(0, 65, 217, 0.1);
    background: #fff;
}

.pk-msg-modal__field textarea {
    min-height: 100px;
}

/* Error & Success */
.pk-msg-modal__error {
    padding: 0.55rem 0.75rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #fecaca;
}

.pk-msg-modal__success {
    padding: 0.65rem 0.85rem;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #bbf7d0;
}

.pk-msg-modal__success i {
    font-size: 1rem;
}

/* Submit */
.pk-msg-modal__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #0041d9 0%, #2563eb 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 65, 217, 0.2);
    font-family: inherit;
    margin-top: 0.25rem;
}

.pk-msg-modal__submit:hover {
    background: linear-gradient(135deg, #003bc4 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(0, 65, 217, 0.3);
    transform: translateY(-1px);
}

.pk-msg-modal__submit:active {
    transform: translateY(0);
}

.pk-msg-modal__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.pk-msg-modal__submit i {
    font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 480px) {
    .pk-msg-modal__card {
        width: 96%;
        padding: 1.25rem;
        border-radius: 0.75rem;
    }

    .pk-msg-modal__header {
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    .pk-msg-modal__icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .pk-msg-modal__title {
        font-size: 1rem;
    }
}