/* Phenix Doações - Public Styles */

/* Prevenir overflow horizontal */
body {
    overflow-x: hidden;
}

.phenix-doacoes-form-container,
.phenix-doar-container,
.phenix-hero-doacoes-v2 {
    max-width: 100%;
    overflow-x: hidden;
}

.phenix-doacoes-form-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.phenix-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e74c3c;
}

.phenix-form-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #2c3e50;
}

.phenix-form-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
}

.phenix-doacoes-form {
    width: 100%;
}

.phenix-form-section {
    margin-bottom: 30px;
}

.phenix-form-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #34495e;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.phenix-form-section .description {
    margin-bottom: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.phenix-radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.phenix-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.phenix-radio-group label:hover {
    background: #e9ecef;
}

.phenix-radio-group input[type="radio"]:checked + span {
    font-weight: 600;
}

.phenix-radio-group label:has(input:checked) {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

/* Cards de Tipos de Doação - Design Visual */
.phenix-tipos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.tipo-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.tipo-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tipo-card-content {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tipo-card:hover .tipo-card-content {
    background: #fff;
    border-color: #dee2e6;
    border-width: 1px;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tipo-card input:checked + .tipo-card-content {
    background: #e8f5e9;
    border-color: #4caf50;
    border-width: 1px;
}

.tipo-icon {
    font-size: 42px;
    margin-bottom: 10px;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.tipo-card input:checked + .tipo-card-content .tipo-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.tipo-card-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.tipo-card input:checked + .tipo-card-content h4 {
    color: #2e7d32;
}

.tipo-card-content p {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .phenix-tipos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .phenix-tipos-grid {
        grid-template-columns: 1fr;
    }
    
    .tipo-card-content {
        padding: 25px 15px;
    }
    
    .tipo-icon {
        font-size: 40px;
    }
}

/* Campos de Detalhamento por Tipo */
.phenix-detalhes-tipos {
    margin-top: 30px;
}

.tipo-detalhes {
    background: #f8f9fa;
    border-left: 4px solid #4caf50;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tipo-detalhes h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
}

.tipo-detalhes small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.tipo-detalhes textarea {
    font-family: inherit;
    line-height: 1.6;
}

.phenix-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.phenix-form-row:has(.phenix-form-group:nth-child(2)) {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .phenix-form-row {
        grid-template-columns: 1fr !important;
    }
}

.phenix-form-group {
    display: flex;
    flex-direction: column;
}

.phenix-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.phenix-form-group input[type="text"],
.phenix-form-group input[type="email"],
.phenix-form-group input[type="tel"],
.phenix-form-group input[type="url"],
.phenix-form-group select,
.phenix-form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.phenix-form-group input:focus,
.phenix-form-group select:focus,
.phenix-form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.phenix-imagem-entidade-field {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.phenix-imagem-entidade-field input[type="url"] {
    flex: 1;
    min-width: 250px;
}

.preview-imagem-entidade {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-imagem-entidade img {
    max-width: 320px;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d9e1e8;
    background: #f5f8fb;
}

.phenix-termo-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.phenix-termo-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.phenix-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 15px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s;
}

.phenix-checkbox-group label:hover {
    border-color: #e74c3c;
}

.phenix-checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.phenix-checkbox-group span {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.phenix-termo-info {
    margin: 10px 0 0 0;
    padding: 10px;
    background: #fff3cd;
    border-radius: 4px;
}

.phenix-termo-info small {
    color: #856404;
}

.phenix-form-actions {
    margin-top: 30px;
    text-align: center;
}

.phenix-btn {
    display: inline-block;
    min-width: 240px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.phenix-btn-primary {
    background: #e74c3c;
    color: #fff;
}

.phenix-btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.phenix-btn-secondary {
    background: #3498db;
    color: #fff;
}

.phenix-btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.phenix-btn .btn-loader {
    display: none;
}

.phenix-btn.loading .btn-text {
    display: none;
}

.phenix-btn.loading .btn-loader {
    display: inline !important;
}

.phenix-btn.loading,
.phenix-btn.loading:hover {
    background: #f39c12;
    color: #fff;
    transform: none;
    box-shadow: none;
    cursor: wait;
    opacity: 1;
}

.phenix-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.phenix-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.phenix-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.phenix-entidades-lista {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.phenix-lista-header {
    text-align: center;
    margin-bottom: 40px;
}

.phenix-lista-header h2 {
    margin: 0 0 10px 0;
    font-size: 36px;
    color: #2c3e50;
}

.phenix-lista-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 18px;
}

.phenix-entidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

@media (max-width: 1024px) {
    .phenix-entidades-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .phenix-entidades-grid {
        grid-template-columns: 1fr;
    }
}

.phenix-entidade-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.phenix-entidade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.entidade-cover-wrap {
    margin: -20px -20px 16px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #eef2f5;
}

.entidade-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.entidade-header {
    margin-bottom: 15px;
}

.entidade-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
}

.entidade-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #e74c3c;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.entidade-tipos-aceitos {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.entidade-tipos-aceitos strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 12px;
}

.tipo-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 3px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.tipo-badge.tipo-dinheiro {
    background: #d4edda;
    color: #155724;
}

.tipo-badge.tipo-alimentos {
    background: #fff3cd;
    color: #856404;
}

.tipo-badge.tipo-compras {
    background: #d1ecf1;
    color: #0c5460;
}

.tipo-badge.tipo-outros {
    background: #e2e3e5;
    color: #383d41;
}

/* Necessidades Detalhadas nos Cards */
.entidade-necessidades {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.necessidade-item {
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
}

.necessidade-item:last-child {
    margin-bottom: 0;
}

.necessidade-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 13px;
}

.necessidade-item span {
    display: block;
    color: #27ae60;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.necessidade-item small {
    display: block;
    color: #7f8c8d;
    line-height: 1.4;
}

.necessidade-info small {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.3;
}

/* Estilos para Upload de Documentos */
.phenix-file-upload {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.phenix-file-upload:hover {
    border-color: #16a085;
    background: #f0fdf4;
}

.phenix-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

.phenix-file-upload::before {
    content: "📁";
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.phenix-file-upload::after {
    content: "Clique para selecionar ou arraste o arquivo aqui";
    font-size: 14px;
    color: #666;
    display: block;
}

.file-upload-preview {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.file-upload-preview.has-file {
    border-color: #16a085;
    background: #f0fdf4;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}

.file-preview-icon {
    font-size: 24px;
}

.file-preview-info {
    flex: 1;
}

.file-preview-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.file-preview-size {
    color: #666;
    font-size: 11px;
}

.file-preview-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}

.documentos-tipo {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.documentos-tipo h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.phenix-file-upload.has-error {
    border-color: #e74c3c;
    background: #fee;
}

.phenix-file-upload.has-success {
    border-color: #27ae60;
    background: #efe;
}

.entidade-descricao {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
    font-size: 14px;
    flex-grow: 1;
}

.entidade-info {
    margin-bottom: 15px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
}

.entidade-info p {
    margin: 6px 0;
    font-size: 13px;
    color: #7f8c8d;
}

.entidade-actions {
    margin-top: auto;
}

.phenix-btn-doar-entidade {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.phenix-btn-doar-entidade:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
    color: #fff;
}

.phenix-btn-doar-entidade .btn-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.phenix-info-doacoes {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.phenix-hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 40px;
}

.phenix-hero-section h1 {
    margin: 0 0 15px 0;
    font-size: 48px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
}

.phenix-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.info-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.info-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #fff;
}

.info-card h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #2c3e50;
}

.info-card p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.6;
}

.phenix-tipos-doacao {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.phenix-tipos-doacao h2 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 32px;
    color: #2c3e50;
}

.tipos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tipo-card {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

/* Removido - estava causando fundo vermelho no hover */

.tipo-card .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.tipo-card h4 {
    margin: 10px 0;
    font-size: 18px;
}

.tipo-card p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

.phenix-cta-section {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.phenix-cta-section h2 {
    margin: 0 0 15px 0;
    font-size: 36px;
    color: #2c3e50;
}

.phenix-cta-section p {
    margin: 0 0 30px 0;
    font-size: 18px;
    color: #7f8c8d;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .phenix-doacoes-form-container {
        padding: 20px;
    }
    
    .phenix-form-header h2 {
        font-size: 24px;
    }
    
    .phenix-hero-section h1 {
        font-size: 32px;
    }
}
