/* ============================================================
   PETZ MODALS — Premium overrides for .modal-custom
   Overrides Modesy base modal styles (style-2.6.css:8789-8853)
   ============================================================ */

/* --- Backdrop --- */
.modal-backdrop.show {
    opacity: 0.45;
}

/* --- Dialog entrance animation --- */
.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* --- Card shell --- */
.modal-custom {
    border: none !important;
    border-radius: var(--petz-radius-lg, 16px) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15),
                0 8px 20px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
}

/* --- Header --- */
.modal-custom .modal-header {
    padding: 28px 32px 16px !important;
    background: linear-gradient(135deg, #fafffe 0%, #f4faf5 100%);
    border-bottom: 1px solid rgba(76, 175, 80, 0.08) !important;
}

.modal-custom .modal-header .modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800 !important;
    font-size: 20px !important;
    color: var(--petz-text-dark, #2d3436);
    letter-spacing: -0.01em;
}

.modal-custom .modal-header .close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    opacity: 1 !important;
    padding: 0;
    right: 20px !important;
    top: 20px !important;
}

.modal-custom .modal-header .close:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    transform: rotate(90deg);
}

.modal-custom .modal-header .close i {
    font-size: 14px;
    line-height: 1;
}

/* --- Body --- */
.modal-custom .modal-body {
    padding: 24px 32px !important;
}

.modal-custom .modal-body .form-group label,
.modal-custom .modal-body p.font-600 {
    font-weight: 700 !important;
    color: var(--petz-text-dark, #2d3436);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

/* --- Textarea --- */
.modal-custom textarea {
    border: 1.5px solid var(--petz-border, #e8e4e0) !important;
    border-radius: var(--petz-radius, 12px) !important;
    padding: 14px 16px !important;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
    min-height: 100px !important;
}

.modal-custom textarea:focus {
    border-color: var(--petz-primary, #4CAF50) !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important;
    background: #fff;
    outline: none;
}

.modal-custom textarea::placeholder {
    color: var(--petz-text-light, #b2bec3);
}

/* --- Footer --- */
.modal-custom .modal-footer {
    padding: 16px 32px 28px !important;
    gap: 10px;
    display: flex !important;
    justify-content: flex-end !important;
}

.modal-custom .modal-footer .btn {
    border-radius: var(--petz-radius, 12px) !important;
    padding: 10px 24px !important;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-custom .modal-footer .btn-gray,
.modal-custom .modal-footer .btn[data-dismiss="modal"] {
    background: #f1f3f5 !important;
    color: var(--petz-text-medium, #636e72) !important;
    border: none !important;
}

.modal-custom .modal-footer .btn-gray:hover,
.modal-custom .modal-footer .btn[data-dismiss="modal"]:hover {
    background: #e9ecef !important;
    color: var(--petz-text-dark, #2d3436) !important;
}

.modal-custom .modal-footer .btn-custom {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.modal-custom .modal-footer .btn-custom:hover {
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
    transform: translateY(-1px);
}

.modal-custom .modal-footer .btn-custom:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* --- Hint text --- */
.modal-custom small.text-muted {
    font-size: 0.78rem;
    color: var(--petz-text-light, #b2bec3) !important;
    display: inline-block;
    margin-top: 6px;
}

/* --- Form inputs inside modals --- */
.modal-custom .form-control,
.modal-custom .form-input {
    border-radius: var(--petz-radius, 12px) !important;
    border: 1.5px solid var(--petz-border, #e8e4e0) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-custom .form-control:focus,
.modal-custom .form-input:focus {
    border-color: var(--petz-primary, #4CAF50) !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important;
}

/* --- Message/alert area inside modals --- */
.modal-custom [id$="Message"],
.modal-custom [id^="response_form_"] {
    border-radius: 8px;
    padding: 0;
    margin-bottom: 12px;
}

.modal-custom [id$="Message"] .text-success,
.modal-custom [id^="response_form_"] .text-success {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
}

.modal-custom [id$="Message"] .text-danger,
.modal-custom [id^="response_form_"] .text-danger {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(231, 76, 60, 0.06);
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
}


/* ============================================================
   REVIEW STARS — Gold interactive stars
   Used in: #profileReviewModal, #reviewModal (product)
   ============================================================ */

#profile-rating-display,
.rating-stars-display {
    display: flex;
    gap: 4px;
    padding: 8px 0 4px;
}

#profile-rating-display i,
.rating-stars-display i {
    font-size: 28px;
    color: #d4d4d4;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

#profile-rating-display i:hover,
.rating-stars-display i:hover {
    transform: scale(1.15);
}

/* Filled star = gold */
#profile-rating-display i.icon-star,
.rating-stars-display i.icon-star {
    color: #f4b400;
    text-shadow: 0 1px 4px rgba(244, 180, 0, 0.25);
}

/* Empty star on hover = light gold hint */
#profile-rating-display i.icon-star-o:hover,
.rating-stars-display i.icon-star-o:hover {
    color: #f4d56c;
}

/* Stars in review list (read-only) — smaller, no interaction */
.list-reviews .rating i {
    color: #f4b400 !important;
    font-size: 14px;
}

.list-reviews .rating i.icon-star-o {
    color: #d4d4d4 !important;
}

/* Review total area stars */
.review-total .rating i {
    color: #f4b400 !important;
}


/* ============================================================
   MESSAGE MODAL — Recipient block & overrides
   Replaces old table-layout .user-contact-modal (style-2.6.css)
   ============================================================ */

/* Green accent stripe at top + override old padding from style-2.6.css */
.modal-send-message .modal-content {
    padding: 0 !important;
    border-top: 3px solid var(--petz-primary, #4CAF50) !important;
}

.modal-send-message .modal-header {
    border-bottom: 0 !important;
    padding-bottom: 8px !important;
}

.modal-send-message .modal-footer {
    border-top: 0 !important;
}

/* Form labels — refined */
.modal-send-message .control-label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--petz-text-medium, #636e72) !important;
    margin-bottom: 6px !important;
}

/* --- Recipient block --- */
.msg-recipient {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--petz-bg-subtle, #f8f9fa);
    border-radius: var(--petz-radius, 12px);
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.msg-recipient:hover {
    background: #f0f2f4;
}

/* Avatar with verified badge overlay */
.msg-recipient-avatar {
    position: relative;
    flex-shrink: 0;
}

.msg-recipient-avatar img {
    width: 56px;
    height: 56px;
    border-radius: var(--petz-radius, 12px);
    object-fit: cover;
    display: block;
}

.msg-verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.msg-verified-badge svg {
    width: 14px;
    height: 14px;
}

/* Info column */
.msg-recipient-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.msg-recipient-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--petz-text-dark, #2d3436);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-recipient-name:hover {
    color: var(--petz-primary, #4CAF50);
}

/* Meta row: role tag + member since */
.msg-recipient-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Role pill tags */
.msg-role-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.4;
}

.msg-role-org {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.msg-role-service {
    background: rgba(33, 150, 243, 0.1);
    color: #1565c0;
}

.msg-role-member {
    background: rgba(0, 0, 0, 0.05);
    color: var(--petz-text-medium, #636e72);
}

.msg-member-since {
    font-size: 0.72rem;
    color: var(--petz-text-light, #b2bec3);
    font-weight: 500;
}

/* --- Readonly subject field (auto-generated) --- */
.modal-custom input[readonly] {
    background: var(--petz-bg-subtle, #f8f9fa) !important;
    color: var(--petz-text-medium, #636e72);
    cursor: default;
    border-color: transparent !important;
}

.modal-custom input[readonly]:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}
