/**
 * NW Contact Manager - Frontend Styles
 */

/* Form wrapper */
.nw-contact-form-wrapper,
.nw-contact-thread-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

/* Form fields */
.nw-contact-form .nw-contact-field {
    margin-bottom: 20px;
}

.nw-contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.nw-contact-form label .required {
    color: #d63638;
}

.nw-contact-form input[type="text"],
.nw-contact-form input[type="email"],
.nw-contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nw-contact-form input:focus,
.nw-contact-form textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.nw-contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.nw-contact-form .nw-contact-field.has-error input,
.nw-contact-form .nw-contact-field.has-error textarea {
    border-color: #d63638;
}

.nw-contact-form .nw-contact-error-msg {
    display: none;
    color: #d63638;
    font-size: 14px;
    margin-top: 5px;
}

.nw-contact-form .nw-contact-field.has-error .nw-contact-error-msg {
    display: block;
}

/* Submit button */
.nw-contact-submit {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nw-contact-button {
    display: inline-block;
    padding: 14px 30px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.nw-contact-button:hover {
    background-color: #135e96;
    color: #fff;
}

.nw-contact-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.nw-contact-status {
    font-size: 14px;
    color: #00a32a;
}

.nw-contact-status.error {
    color: #d63638;
}

/* Confirmation */
.nw-contact-confirmation {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.nw-contact-confirmation .confirmation-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: #00a32a;
    color: #fff;
    border-radius: 50%;
    font-size: 36px;
    margin-bottom: 20px;
}

.nw-contact-confirmation h2 {
    margin: 0 0 10px;
    color: #1d2327;
}

.nw-contact-confirmation p {
    margin: 0 0 25px;
    color: #666;
}

/* Error state */
.nw-contact-error {
    text-align: center;
    padding: 40px 20px;
    background: #fce4e4;
    border-radius: 10px;
}

.nw-contact-error p {
    margin: 0 0 20px;
    color: #d63638;
}

/* Thread view */
.nw-contact-thread-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.nw-contact-thread-header h2 {
    margin: 0 0 8px;
    color: #1d2327;
}

.nw-contact-thread-header .thread-meta {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Thread messages */
.nw-contact-thread-messages {
    margin-bottom: 30px;
}

.nw-contact-thread-messages .thread-message {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.nw-contact-thread-messages .thread-message-user {
    background-color: #f6f7f7;
    margin-right: 30px;
}

.nw-contact-thread-messages .thread-message-admin {
    background-color: #e5f0fa;
    margin-left: 30px;
}

.nw-contact-thread-messages .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.nw-contact-thread-messages .message-sender {
    font-weight: 600;
    color: #1d2327;
}

.nw-contact-thread-messages .message-date {
    color: #666;
}

.nw-contact-thread-messages .message-content {
    color: #333;
    line-height: 1.6;
}

/* Thread reply */
.nw-contact-thread-reply {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nw-contact-thread-reply h3 {
    margin: 0 0 15px;
    color: #1d2327;
}

/* Responsive */
@media (max-width: 600px) {
    .nw-contact-thread-messages .thread-message-user,
    .nw-contact-thread-messages .thread-message-admin {
        margin-left: 0;
        margin-right: 0;
    }

    .nw-contact-submit {
        flex-direction: column;
        align-items: flex-start;
    }

    .nw-contact-button {
        width: 100%;
        text-align: center;
    }
}
