/* Block Tienes Dudas - Styles matching the design image */

/* Main container - remove default block padding and styling */
.block_tienes_dudas {
    border: none !important;
    box-shadow: none !important;
}

.block_tienes_dudas .content {
    padding: 0 !important;
}

.block_tienes_dudas .card-body {
    padding: 0 !important;
}

/* Block container - centered with max-width (this is the inner div from template) */
section.block_tienes_dudas .content .block_tienes_dudas,
section.block_tienes_dudas .card-body .block_tienes_dudas {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: #000000;
    color: #FFFFFF;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.block-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.block-title {
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.block-subtitle {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.form-container {
    background: #FFFFFF;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-container .form-control {
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 1rem;
    color: #000000;
    box-shadow: none;
    resize: none;
}

.form-container .form-control:focus {
    border: none;
    box-shadow: none;
    outline: none;
    background: transparent;
}

.form-container .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.form-container .row {
    margin-bottom: 0.75rem;
}

.form-container .row:last-child {
    margin-bottom: 0;
}

.form-container .form-control[type="text"],
.form-container .form-control[type="email"] {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-container .form-control[type="text"]:focus,
.form-container .form-control[type="email"]:focus {
    border-bottom: 2px solid #000000;
    padding-bottom: calc(0.5rem - 1px);
}

.form-container textarea.form-control {
    min-height: 2.5rem;
    border: none;
    padding: 0.5rem 0;
    line-height: 1.5;
}

.form-container textarea.form-control:focus {
    border: none;
}

.btn-send {
    background: #A8E048;
    color: #000000;
    border: none;
    border-radius: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-send:hover {
    background: #9BD03F;
    color: #000000;
    transform: translateY(-1px);
}

.btn-send:active {
    transform: translateY(0);
    background: #8FC035;
}

.btn-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-send svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.block-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-admin {
    color: #A8E048;
    font-weight: 500;
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-admin:hover {
    color: #9BD03F;
    text-decoration: underline;
}

/* Feedback messages */
#form_feedback {
    margin: 0 1.5rem 1rem 1.5rem;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

#form_feedback.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

#form_feedback.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .block-title {
        font-size: 1.5rem;
    }
    
    .block-subtitle {
        font-size: 0.9rem;
    }
    
    .form-container {
        margin: 0 1rem 1rem 1rem;
        padding: 0.875rem 1rem;
    }
    
    .block-header {
        padding: 1.25rem 1rem 0.875rem 1rem;
    }
    
    .block-footer {
        padding: 0.875rem 1rem 1.25rem 1rem;
    }
    
    .btn-send {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Ensure form inputs align properly */
.form-container .d-flex {
    align-items: flex-start;
}

.form-container .flex-grow-1 {
    min-width: 0;
}

/* Hide labels visually but keep for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Messages page styles */
.messages-page-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 1rem;
}

.messages-container {
    max-width: 1200px;
    margin: 0 auto;
}

.message-card {
    transition: box-shadow 0.2s ease;
}

.message-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.message-card.pending {
    border-left: 4px solid #ffc107;
}

.message-card.responded {
    border-left: 4px solid #198754;
    opacity: 0.9;
}

.sender-info {
    flex: 1;
}

.user-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #A8E048;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-initials.d-inline-flex {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
}

.message-content {
    border-left: 3px solid #0d6efd;
}

.response-section {
    border-left: 3px solid #198754;
}

.response-form-section {
    margin-top: 1rem;
}

.response-form-section .form-group {
    margin-bottom: 1rem;
}

.response-form-section textarea {
    min-height: 120px;
}

/* Message list item styles */
.message-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.message-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.message-item.pending {
    border-left: 4px solid #ffc107;
}

.message-item.responded {
    border-left: 4px solid #198754;
}

/* Filters section */
.filters-section .card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Message detail view */
.message-detail-card {
    max-width: 900px;
    margin: 0 auto;
}

.message-detail-card.pending {
    border-left: 4px solid #ffc107;
}

.message-detail-card.responded {
    border-left: 4px solid #198754;
}

@media (max-width: 768px) {
    .messages-container {
        padding: 0 0.5rem;
    }
    
    .message-card .card-body {
        padding: 1rem;
    }
    
    .message-item .card-body {
        padding: 1rem !important;
    }
    
    .filters-section .row {
        margin-bottom: 0.5rem;
    }
    
    .filters-section .col-md-3,
    .filters-section .col-md-6 {
        margin-bottom: 0.5rem;
    }
}
