/* Modal Crear/Editar campaña Ad-hoc */
.camp-edit-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: camp-edit-fade-in 0.2s ease-out;
}

@keyframes camp-edit-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.camp-edit-container {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 92%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: camp-edit-slide-up 0.25s ease-out;
}

@keyframes camp-edit-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.camp-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-gradient);
    border-radius: 14px 14px 0 0;
}

.camp-edit-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
}

.camp-edit-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.camp-edit-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.camp-edit-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.camp-edit-body .form-group-vertical {
    margin-bottom: 16px;
}

.camp-edit-body .form-group-vertical label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.camp-edit-required {
    color: #ef4444;
    font-weight: 700;
}

.camp-edit-error {
    display: block;
    margin-top: 6px;
    color: #ef4444;
    font-size: 0.82rem;
}

/* Editor estructurado de puntos: layout vertical de ancho completo,
   evita el flex-row de .form-group-vertical global que apretaba los inputs. */
.puntos-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
}

.puntos-section > label {
    margin-bottom: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.puntos-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.punto-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.punto-row .modern-input {
    padding: 6px 9px;
    font-size: 0.85rem;
}

.punto-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.punto-remove:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
}

.punto-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid rgba(240, 116, 0, 0.45);
    background: rgba(240, 116, 0, 0.08);
    color: #F07400;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
                box-shadow 0.18s ease, transform 0.12s ease;
}

.punto-add:hover {
    background: #F07400;
    color: #ffffff;
    border-color: #F07400;
    box-shadow: 0 4px 12px rgba(240, 116, 0, 0.35);
    transform: translateY(-1px);
}

.punto-add:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(240, 116, 0, 0.30);
}

.puntos-empty {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 8px;
}

.camp-edit-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 40px 0;
}

.camp-edit-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(240, 116, 0, 0.2);
    border-top-color: #F07400;
    border-radius: 50%;
    animation: camp-edit-spin 0.8s linear infinite;
}

@keyframes camp-edit-spin {
    to { transform: rotate(360deg); }
}

.camp-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
}

.camp-edit-footer .btn-secondary,
.camp-edit-footer .btn-primary-gradient {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.camp-edit-footer .btn-secondary {
    background: transparent;
    color: var(--text-primary);
}

.camp-edit-footer .btn-secondary:hover {
    background: var(--border-color);
}

.camp-edit-footer .btn-primary-gradient {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
}

.camp-edit-footer .btn-primary-gradient:hover:not(:disabled) {
    filter: brightness(1.05);
}

.camp-edit-footer .btn-primary-gradient:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
